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 the purpose of 'register' keyword in c language?

630


What is #define in c?

622


How can a program be made to print the name of a source file where an error occurs?

731


Explain how can you be sure that a program follows the ansi c standard?

866


For what purpose null pointer used?

609






‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2373


What is int main () in c?

628


What is default value of global variable in c?

564


Can we declare function inside main?

571


What is a node in c?

550


What is the purpose of the statement: strcat (S2, S1)?

642


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

612


Where in memory are my variables stored?

637


Write a program to reverse a linked list in c.

648


What is a ternary operator in c?

655