Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Explain can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

0 Answers  


Which header file should you include if you are to develop a function which can accept variable number of arguments?

0 Answers   TCS, TISL,


while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?

4 Answers   Aptech,


Is void a keyword in c?

0 Answers  


How do you search data in a data file using random access method?

0 Answers  


which is conditional construct a) if statement b) switch statement c) while/for d) goto

0 Answers  


What are types of functions?

0 Answers  


What is extern variable in c with example?

0 Answers  


What is a pointer in c plus plus?

0 Answers  


Convert the following expression to postfix and prefix X $ Y Z - M + N + P / Q / (R + S)

2 Answers  


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

0 Answers  


Categories