ProgrammingModerateGATE CS · Campus placements
What does printf("%d", sizeof(int) > sizeof(char)) print?
- A. 1
- B. 0
- C. sizeof(int)
- D. compile error
Correct answer: A. 1
sizeof(char) is always 1 and sizeof(int) is at least 2 in C, so the comparison is true and prints 1.