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 meaning of ?
What are the advantages and disadvantages of pointers?
What does 3 periods mean in texting?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is the use of volatile?
What is wrong with this program statement? void = 10;
Who invented b language?
What are the Advantages of using macro
The statement, int(*x[]) () what does in indicate?
Can a void pointer point to a function?
What is assignment operator?
How do I send escape sequences to control a terminal or other device?
When should the volatile modifier be used?
I heard that you have to include stdio.h before calling printf. Why?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????