Question: 2. What does the following code do?<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="c"><pre class="de1"><span class="co2">#include&lt;stdio.h&gt;</span> <span class="kw4">int</span> cnt <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> <span class="kw4">int</span> recursive_search_num<span class="br0">(</span><span class="kw4">int</span> <span class="sy0">*</span>arr<span class="sy0">,</span> <span class="kw4">int</span> num<span class="sy0">,</span> <span class="kw4">int</span> idx<span class="sy0">,</span> <span class="kw4">int</span> len<span class="br0">)</span> <span class="br0">{</span> <span class="kw4">int</span> cnt <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span>idx <span class="sy0">==</span> len<span class="br0">)</span> <span class="kw1">return</span> cnt<span class="sy0">;</span> <span class="kw1">if</span><span class="br0">(</span>arr<span class="br0">[</span>idx<span class="br0">]</span> <span class="sy0">==</span> num<span class="br0">)</span> cnt<span class="sy0">++;</span> <span class="kw1">return</span> cnt <span class="sy0">+</span> recursive_search_num<span class="br0">(</span>arr<span class="sy0">,</span> num<span class="sy0">,</span> idx<span class="sy0">+</span><span class="nu0">1</span><span class="sy0">,</span> len<span class="br0">)</span><span class="sy0">;</span> <span class="br0">}</span> <span class="kw4">int</span> main<span class="br0">(</span><span class="br0">)</span> <span class="br0">{</span> <span class="kw4">int</span> arr<span class="br0">[</span><span class="nu0">8</span><span class="br0">]</span> <span class="sy0">=</span><span class="br0">{</span><span class="nu0">0</span><span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span><span class="nu0">3</span><span class="sy0">,</span><span class="nu0">5</span><span class="sy0">,-</span><span class="nu0">6</span><span class="sy0">,</span><span class="nu0">7</span><span class="br0">}</span><span class="sy0">,</span>num <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">,</span>len <span class="sy0">=</span> <span class="nu0">8</span><span class="sy0">;</span> <span class="kw4">int</span> ans <span class="sy0">=</span> recursive_search_num<span class="br0">(</span>arr<span class="sy0">,</span>num<span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span>len<span class="br0">)</span><span class="sy0">;</span> <span class="kw3">printf</span><span class="br0">(</span><span class="st0">"%d"</span><span class="sy0">,</span>ans<span class="br0">)</span><span class="sy0">;</span> <span class="kw1">return</span> <span class="nu0">0</span><span class="sy0">;</span> <span class="br0">}</span></pre></div></div></div></div></div></div>
Options:
Adds all the indexes of the number 0
Finds the first last occurrence of the number 0
Counts the number of occurrences of the number 0
None of the mentioned
Answer: C