ISRO | ISRO CS 2017 | Question 74
Consider the function
int func(int num) { int count = 0; while(num) { count++; num >>= 1; } return(count) ; }
For func(435) the value returned is
(A) 9
(B) 8
(C) 0
(D) 10
Answer: (A)
Explanation: For detailed solution refer GATE-CS-2014-(Set-2)
So option (A) is correct.
Quiz of this Question
Please Login to comment...