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));}
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between break and continue?
What are the different data types in C?
Explain the use of keyword 'register' with respect to variables.
What is the basic structure of c?
Explain what math functions are available for integers? For floating point?
What is the correct declaration of main?
Explain what does it mean when a pointer is used in an if statement?
Are enumerations really portable?
What is meant by preprocessor in c?
Explain what are multidimensional arrays?
What is the use of a semicolon (;) at the end of every program statement?
How can I pad a string to a known length?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What is the purpose of sprintf?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }