Consider the function func shown below: int func(int num) { int count = 0;…

PYQ GATE 2014

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 __________.

Attempted by 474 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…