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



Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / shashishekhar.eg

Size of a ::4
Size of 2.0 ::8

Is This Answer Correct ?    17 Yes 6 No

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

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

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / musa

Size of a ::4
Size of 2.0 ::8

Is This Answer Correct ?    2 Yes 0 No

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / ricky dobriyal

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

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

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

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / pankaj khurana

size of a:: 4
size of 2.0::4

Is This Answer Correct ?    0 Yes 2 No

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / deepshree sinha

2
2

Is This Answer Correct ?    0 Yes 3 No

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / chandrashekhar

In turbo c
a::2
2.0::2

GCC
a::4
2.0::2

Is This Answer Correct ?    0 Yes 3 No

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / rajeswari sethu

hi guys my answer is 2,2

Is This Answer Correct ?    0 Yes 6 No

Find the output? void main() {float a=2.0; printf("\nSize of a ::%d",sizeof(a..

Answer / selvapriya

hi frnds...i think my ans is 2,2

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More C Interview Questions

hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????

1 Answers  


Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….

1 Answers  


what will happen if you free a pointer twice after allocating memory dynamically ?

3 Answers   Novell,


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);

0 Answers  


How can I change the size of the dynamically allocated array?

0 Answers  






What is the purpose of the preprocessor directive error?

0 Answers  


What is array of structure in c?

0 Answers  


what is the meaning of java that is (J A V A) full form of JAVA

71 Answers   AKS University, Bhel, BNL, BPO, HCL, Peacecon,


What is spark map function?

0 Answers  


How do I send escape sequences to control a terminal or other device?

0 Answers  


please send me papers for Dy. manager IT , PNB. it would be a great help for me.

0 Answers  


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

0 Answers   Aspire, Infogain,


Categories