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));}
Answers were Sorted based on User's Feedback
Answer / 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 |
hello fnd..i am ricky dobriyal
output:-
Size of a =4
Size of 2.0=8 /* because of double*/
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / manish soni tagore collage jai
here a as a float so 4bytes
and 2.0 is work as double.
when 2.0f work as a flaot so .
sizeof(2.0f)is 4 byte
| Is This Answer Correct ? | 0 Yes | 1 No |
Write a program which returns the first non repetitive character in the string?
How macro execution is faster than function ?
How are pointers declared in c?
How can I find the modification date of a file?
What is meaning of tree
how do you execute a c program in unix.
Write a program to print a (*)pattern programming (A to Z) in capital in one programming ?
What is function prototype in c language?
What does c value mean?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
What is a structure in c language. how to initialise a structure in c?
write a program for 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4 4