main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / deepali chandra
o/p 1 2 2
sizeof('3')takes 3 as character and so, size of a character
is 1 byte
sizeof("3") takes 3 as a string so, one
character 3 and end character '\0'. so, sizeof("3") gives
o/p 2
and
sizeof(3) takes 3 as integer so size of an integer is 2
bytes
| Is This Answer Correct ? | 17 Yes | 22 No |
Post New Answer View All Answers
main() { printf("hello"); fork(); }
How can type-insensitive macros be created?
What is a char c?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What is the usage of the pointer in c?
Difference between malloc() and calloc() function?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
Explain what is the concatenation operator?
What is extern keyword in c?
Do you know pointer in c?
How can you check to see whether a symbol is defined?
What is an operator?
What is the difference between %d and %i?
What are near, far and huge pointers?