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 |
Explain the differences between public, protected, private and internal.
How to calculate sum
accept character from keyboard untill the user presses the enter key.If the user enters any character other than upper case(A-Z)alphabets program should stop taking any input
Write a program to print factorial of given number using recursion?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }
Question 1: You want to conduct a survey within your classroom, on the quality of canteen’s food. You ask each of your class fellows to rank the quality of food between 1 and 5 (1 representing excellent quality and 5 representing worst quality). During the survey, you make a list containing the roll# of student and the opinion given by that student. The list can be as follow Roll # Opinion 234 1 235 1 236 5 237 1 238 2 239 3 240 5 241 5 242 1 To get the results of the survey, you need to determine the frequency of each opinion value. The frequency of an opinion is determined by counting the number of students giving that opinion. For example, for the above list the frequency of opinion value 1 is 4 and frequency of opinion value 4 is 0. After getting the frequency of each opinion, you can easily judge about the quality of the food by seeing through the frequency of each opinion. You need to develop a program to calculate the results of this survey. The program inputs the opinion of 50 students and counts the frequency of each opinion. It then displays a report showing the frequency of each opinion. Sample output: Opinion Frequency Remarks 1 5 Excellent 2 10 Good 3 15 Normal 4 10 Bad 5 10 Really bad
What is a pragma?
main() { char ch='356'; Printf("%d",ch); } *OUTPUT*:- -18 *Why?*
What is #line?
What does char * * argv mean in c?
Which is better oop or procedural?