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
What is the difference between ++a and a++?
Explain what’s a signal? Explain what do I use signals for?
How do I swap bytes?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What are the restrictions of a modulus operator?
What is string length in c?
Who developed c language?
Can we change the value of constant variable in c?
What is restrict keyword in c?
Why is c used in embedded systems?
What is the mean of function?
a c code by using memory allocation for add ,multiply of sprase matrixes
Explain what is the most efficient way to store flag values?
Why doesn't C support function overloading?
Why main is used in c?