Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2017 | Question 74

Improve Article
Save Article
  • Last Updated : 15 Mar, 2018
Improve Article
Save Article

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

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!