(C Question) sizeof Question What is the output of this code snippet?
Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.
(C Question) sizeof Question
What is the output of this code snippet?
#include <stdio.h>
int value(int *x){
static int count;
while(*x){
count=count+(*x&1);
*x>>=1;
}
return count;
}
int main()
Pick ONE option
Show answer & explanation
Answer: A. A) 10
Verified technical evaluation based on core computer science and mathematical principles.
Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.