main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?
Answer Posted / vinay kabra
Answer is : 1 2 2
because
sizeof('3')takes 3 as character and so, size of a character
is 1 byte
sizeof("3") takes 3 as a string so, here strinf contains 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 ? | 18 Yes | 24 No |
Post New Answer View All Answers
What is #line used for?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
What are local variables c?
#include
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
What are the advantages of external class?
What are the features of c languages?
How pointer is different from array?
What is the use of #include in c?
Can you apply link and association interchangeably?
Explain output of printf("Hello World"-'A'+'B'); ?
What is the use of the function in c?
What do you know about the use of bit field?
What is a scope resolution operator in c?
Differentiate call by value and call by reference?