Find the output?
void main()
{float a=2.0;
printf("\nSize of a ::%d",sizeof(a));
printf("\nSize of 2.0 ::%d",sizeof(2.0));}
Answer Posted / aravind
ok guys.
Here ans is 4 and 4.
I think %d specifier is for integer and it takes a=2 and prints 4 bytes for gcc and 2 bytes for turbo. Sizeof(2.0) also takes %d integer specifier and prints 4.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is the difference between union and anonymous union?
In a switch statement, what will happen if a break statement is omitted?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What are types of functions?
Write a program to print “hello world” without using semicolon?
find out largest elemant of diagonalmatrix
What is chain pointer in c?
Can we replace the struct function in tree syntax with a union?
What is New modifiers?
List the different types of c tokens?
What is string constants?
Explain about block scope in c?
Why is sizeof () an operator and not a function?
What are identifiers in c?
In which header file is the null macro defined?