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 to compare 2 numbers without using logical operators?
How can I make a program in c to print 'Hello' without using semicolon in the code?
9 Answers C DAC, Practical Viva Questions,
Explain how do you override a defined macro?
What do you know about the use of bit field?
can please someone teach me how to create this program using while statement.. this is the output should look like 0 2 4 6 8 10 -thanks.. :) need it asap...
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
Why main function is special give two reasons?
Using which language Test cases are added in .ptu file of RTRT unit testing???
Why does this code crash?
How can I run c program?
Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...