main()
{int a=200*200/100;
printf("%d",a);
}
Answer Posted / vishi
200*200=40000;
as the range of int(-32768 to +32767)
40000 exeeds +32767 &hence goes to the other side,
40000-32767=7233;
now (-32768+7233)=(-25535);
hence the value of 40000 will be -25535;
result be (-25535/100)="-255"(integer value).
Is This Answer Correct ? | 24 Yes | 2 No |
Post New Answer View All Answers
What is array within structure?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
How can I pad a string to a known length?
Explain the difference between ++u and u++?
Dont ansi function prototypes render lint obsolete?
What are the general description for loop statement and available loop types in c?
What is structure padding and packing in c?
What is clrscr ()?
Difference between linking and loading?
Write a program for Overriding.
Explain how do you override a defined macro?
Are the variables argc and argv are local to main?
Is null always equal to 0(zero)?
What is volatile variable in c with example?
How to write a code for reverse of string without using string functions?