Question: 14. For which type of graph, the given program won’t run infinitely? The Input would be in the form of an adjacency Matrix and n is its dimension (1<n<10).<div class="hk1_style-wrap4"><div class="hk1_style-wrap3"><div class="hk1_style-wrap2"><div class="hk1_style-wrap"><div class="hk1_style"><div class="cpp"><pre class="de1"><span class="co2">#include &lt;bits/stdc++.h&gt; </span> <span class="kw2">using</span> <span class="kw2">namespace</span> std<span class="sy4">;</span> <span class="kw4">int</span> G<span class="br0">[</span><span class="nu0">10</span><span class="br0">]</span><span class="br0">[</span><span class="nu0">10</span><span class="br0">]</span><span class="sy4">;</span> <span class="kw4">void</span> fun<span class="br0">(</span><span class="kw4">int</span> n<span class="br0">)</span><span class="sy4">;</span> &nbsp; <span class="kw4">int</span> main<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span> <span class="kw4">int</span> num<span class="sy1">=</span><span class="nu0">0</span><span class="sy4">;</span> <span class="kw4">int</span> n<span class="sy4">;</span> <span class="kw3">cin</span><span class="sy1">&gt;&gt;</span>n<span class="sy4">;</span> <span class="kw1">for</span><span class="br0">(</span><span class="kw4">int</span> i<span class="sy1">=</span><span class="nu0">0</span><span class="sy4">;</span>i<span class="sy1">&lt;</span>n<span class="sy4">;</span>i<span class="sy2">++</span><span class="br0">)</span> <span class="kw1">for</span><span class="br0">(</span><span class="kw4">int</span> j<span class="sy1">=</span><span class="nu0">0</span><span class="sy4">;</span>j<span class="sy1">&lt;</span>n<span class="sy4">;</span>j<span class="sy2">++</span><span class="br0">)</span> <span class="kw3">cin</span><span class="sy1">&gt;&gt;</span>G<span class="br0">[</span>i<span class="br0">]</span><span class="br0">[</span>j<span class="br0">]</span><span class="sy4">;</span> fun<span class="br0">(</span>n<span class="br0">)</span><span class="sy4">;</span> <span class="kw1">return</span> <span class="nu0">0</span><span class="sy4">;</span> <span class="br0">}</span> &nbsp; <span class="kw4">void</span> fun<span class="br0">(</span><span class="kw4">int</span> n<span class="br0">)</span> <span class="br0">{</span> <span class="kw1">for</span><span class="br0">(</span><span class="kw4">int</span> i<span class="sy1">=</span><span class="nu0">0</span><span class="sy4">;</span>i<span class="sy1">&lt;</span>n<span class="sy4">;</span>i<span class="sy2">++</span><span class="br0">)</span> <span class="kw1">for</span><span class="br0">(</span><span class="kw4">int</span> j<span class="sy1">=</span><span class="nu0">0</span><span class="sy4">;</span>j<span class="sy1">&lt;</span>n<span class="sy4">;</span>j<span class="sy2">++</span><span class="br0">)</span> <span class="kw1">if</span><span class="br0">(</span>G<span class="br0">[</span>i<span class="br0">]</span><span class="br0">[</span>j<span class="br0">]</span><span class="sy1">==</span><span class="nu0">1</span><span class="br0">)</span> j<span class="sy2">--</span><span class="sy4">;</span> <span class="br0">}</span></pre></div></div></div></div></div></div>
Options:
All Fully Connected Graphs
All Empty Graphs
All Bipartite Graphs
All simple graphs
Answer: A