Problem Statement:-
What would be the output for the following program?
main( )
{
printf ( "\n%d%d", sizeof ( '3' ), sizeof ( "3" ), sizeof ( 3 ) ) ;
}
I am working with 32 bit gcc compiler. And it is printing the output as-
4, 2, 4
I am confused why it is printing 4
for sizeof ( '3' )
. 3 is in single inverted commas so it will be a character right? Then it shouldn't print out 4? Am I right?