Consider the following C function: void foo(int n) { while (n != 0) { if (!(n…
Consider the following C function:
void foo(int n)
{
while (n != 0)
{
if (!(n & 1))
printf("*");
n = n >> 1;
}
}
The number of times printf("*") statement is executed, when the value 2²⁴ is passed to the function foo() is ____.
Attempted by 58 students.
Sign up free to check your answer
Sign up freeLoading lesson…

