What will be the value retuned by the following function, when it is called with a value 11?
recur(int num)
if ( ( num/2) !=0 )
return ( recur(num/2 ) * 10+num%2 );
else return 1;
A. | Function does not return any value, because it goes into an infinite loop |
B. | 11 |
C. | 1011 |
D. | None of these |
Answer : C Explanation : |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |