Q. What is the output of the following code?
Code:
#include <stdio.h>
int main() {
printf("%d", sizeof('A'));
return 0;
}
β
Correct Answer: (C)
4
Explanation: In C, character literals like 'A' are treated as int, so sizeof('A') returns 4.