main() { int *p1, i=25; void *p2; p1=&i; p2=&i; p1=p2; p2=p1; printf(“%d”,i); }
-
error
-
25
-
will not complie
-
some memory address
B
Correct answer
Explanation
In C, a void pointer (void*) can be implicitly assigned to any other pointer type without explicit casting. This is a special property of void pointers. After p1=p2 and p2=p1, both pointers still point to i, which holds value 25. The printf correctly outputs 25. The 'will not compile' distractor is incorrect because void* to other pointer assignment is valid in C.