main()
{
float a=3.2e40;
printf("%d",a);
}
Answers were Sorted based on User's Feedback
Answer / pankaj bhalerao
i run this and i found that the answer is zero because a
is declared as float and it is print ans integer and its
mantissa part is also a float therefore the output is zero.
thank you...
Is This Answer Correct ? | 12 Yes | 2 No |
Answer / pushpanjali panda
after running the program i got the answer is 0.
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / iftekhar
main()
{
int i=300*300/300;
printf("%d",i);
}
Is This Answer Correct ? | 12 Yes | 9 No |
Answer / vignesh1988i
as for as i know ,
here however 'a' is a float variable when it comes
to printf , the floating numbers will be truncated and it
outputs as 3
thank u
Is This Answer Correct ? | 11 Yes | 9 No |
Answer / deepali chandra
the o/p=0
because here we are trying to print the value in int form
which has been of float datatype.since float has a higher
precendence over int therefore it will give the o/p=0 and
similarly after this every output will be =0.this is the
function of the compiler that we cannot print the value of
a higher data type using a lower datatype.
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / siva
a is declared as float but it is printed as integer so it
must be wrong.........
Is This Answer Correct ? | 0 Yes | 1 No |
it is not execute, bcz in the printf satement declared as
integer so answer is 0.
Is This Answer Correct ? | 0 Yes | 1 No |
4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none
What are the scope of static variables?
List some applications of c programming language?
write the output of following code .. main() { static int a[]={10,20,30,40,50}; int *ptr=a; static int arr[2][2]={1,2,3,4}; char str[]="ABCD * 4#"; char *s=str+2; int i,j; for(i=0;i<5,i++) printf("%d",*ptr++); for(i=0;i<2;i++) for(j=0;j<2;j++) printf("%d\n",*(*(n+i)+j)); printf("%c\n%c\n%c\n",*(str+2),*s++,*--s); }
How do I use void main?
Program to display given 3 integers in ascending order
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
How can I find out how much memory is available?
What is modeling?
Explain how can I make sure that my program is the only one accessing a file?
WHAT IS LOW LEVEL LANGUAGE?
Explain what are linked list?