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
Are the variables argc and argv are local to main?
What is size of union in c?
What is else if ladder?
Explain what is a program flowchart and explain how does it help in writing a program?
write a program to find out prime number using sieve case?
What are the differences between Structures and Arrays?
Define macros.
What is meant by operator precedence?
What is graph in c?
What is hash table in c?
Explain what is wrong with this statement? Myname = ?robin?;
What are the various types of control structures in programming?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What is s in c?
hi send me sample aptitude papers of cts?