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 |
Explain can the sizeof operator be used to tell the size of an array passed to a function?
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
Which header file should you include if you are to develop a function which can accept variable number of arguments?
while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?
Is void a keyword in c?
How do you search data in a data file using random access method?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What are types of functions?
What is extern variable in c with example?
What is a pointer in c plus plus?
Convert the following expression to postfix and prefix X $ Y Z - M + N + P / Q / (R + S)
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?