Question: 7. What would be the output of the following C++ program if the given input is<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="nu0">0</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">1</span> <span class="nu0">1</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">1</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">1</span> <span class="nu0">0</span> <span class="nu0">1</span> <span class="nu0">0</span> <span class="nu0">1</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">1</span> <span class="nu0">1</span> <span class="nu0">0</span> <span class="nu0">0</span> <span class="nu0">0</span> &nbsp; <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">bool</span> visited<span class="br0">[</span><span class="nu0">5</span><span class="br0">]</span><span class="sy4">;</span> <span class="kw4">int</span> G<span class="br0">[</span><span class="nu0">5</span><span class="br0">]</span><span class="br0">[</span><span class="nu0">5</span><span class="br0">]</span><span class="sy4">;</span> &nbsp; <span class="kw4">void</span> fun<span class="br0">(</span><span class="kw4">int</span> i<span class="br0">)</span> <span class="br0">{</span> <span class="kw3">cout</span><span class="sy1">&lt;&lt;</span>i<span class="sy1">&lt;&lt;</span><span class="st0">" "</span><span class="sy4">;</span> visited<span class="br0">[</span>i<span class="br0">]</span><span class="sy1">=</span><span class="kw2">true</span><span class="sy4">;</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><span class="nu0">5</span><span class="sy4">;</span>j<span class="sy2">++</span><span class="br0">)</span> <span class="kw1">if</span><span class="br0">(</span><span class="sy3">!</span>visited<span class="br0">[</span>j<span class="br0">]</span><span class="sy3">&amp;&amp;</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> fun<span class="br0">(</span>j<span class="br0">)</span><span class="sy4">;</span> <span class="br0">}</span> &nbsp; <span class="kw4">int</span> main<span class="br0">(</span><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><span class="nu0">5</span><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><span class="nu0">5</span><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> &nbsp; <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><span class="nu0">5</span><span class="sy4">;</span>i<span class="sy2">++</span><span class="br0">)</span> visited<span class="br0">[</span>i<span class="br0">]</span><span class="sy1">=</span><span class="nu0">0</span><span class="sy4">;</span> &nbsp; fun<span class="br0">(</span><span class="nu0">0</span><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></pre></div></div></div></div></div></div>
Options:
0 2 3 1 4
0 3 2 4 1
0  2 3 4 1
0 3 2 1 4
Answer: C