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 |
What are the c keywords?
what is the benefit of c30
write a program that print itself even if the source file is deleted?
How do you access command-line arguments?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
How will you write a code for accessing the length of an array without assigning it to another variable?
Write a program which returns the first non repetitive character in the string?
Why is python slower than c?
Why n++ execute faster than n+1 ?
Write a program to print a (*)pattern programming (A to Z) in capital in one programming ?
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..???
how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.