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 |
how many argument we can pas in in a function
What is a class?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What is the output of following program ? int main() { int x = 5; printf("%d %d %d\n", x, x << 2, x >> 2); }
What is c programing language?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
write a string copy function routine?
How many parameters should a function have?
c program to subtract between two numbers without using '-' sign and subtract function.
What is struct node in c?
Explain what is the benefit of using enum to declare a constant?
How we can insert comments in a c program?