Monday, August 17, 2009

c++: sizeof('c'); ocmpiler dependent.

main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
A) 4, 100
B) 2, 100
C) 2, 2
D) 4, 4


MS--turbo, borland--g++ Might be different.

Answer will be 1 4 if you use a G++ compiler on a UNIX machine.

No comments:

Post a Comment