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


Please Help Members By Posting Answers For Below Questions

What is array within structure?

578


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

2717


How can I pad a string to a known length?

608


Explain the difference between ++u and u++?

633


Dont ansi function prototypes render lint obsolete?

601






What are the general description for loop statement and available loop types in c?

681


What is structure padding and packing in c?

612


What is clrscr ()?

633


Difference between linking and loading?

686


Write a program for Overriding.

676


Explain how do you override a defined macro?

579


Are the variables argc and argv are local to main?

780


Is null always equal to 0(zero)?

578


What is volatile variable in c with example?

581


How to write a code for reverse of string without using string functions?

1575