GATE CS 2014, set 2 · Question 20 · Programming and Data Structures · Numerical answer (NAT) · 1 mark · no negative marks

Consider the function func shown below:
int func(int num) { int count = 0; while (num) { count++; num>>= 1; } return (count); }
The value returned by func(435) is ______.

Answer

Answer 9

Answer from the official GATE CS 2014 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes