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
Is null always equal to 0(zero)?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Why we use void main in c?
Write a program to print fibonacci series using recursion?
What is a structure in c language. how to initialise a structure in c?
In a header file whether functions are declared or defined?
What is the right way to use errno?
What is #define in c?
Explain the concept and use of type void.
Explain how to reverse singly link list.
How can I dynamically allocate arrays?
Where in memory are my variables stored?
write a program fibonacci series and palindrome program in c
Is Exception handling possible in c language?