#include <stdio.h>
int main()
{
printf ( "%d" , sizeof ( printf ( "GeeksQuiz" )));
return 0;
}
|
(A) GeeksQuiz4
(B) 4GeeksQuiz
(C) GeeksQuiz9
(D) 4
(E) Compile-time error
Answer: (D)
Explanation: An expression doesn’t get evaluated inside sizeof operator. GeeksQuiz will not be printed. printf returns the number of characters to be printed i.e. 9 which is an integer value. sizeof operator returns sizeof(int).