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 the purpose of 'register' keyword in c language?
What is #define in c?
How can a program be made to print the name of a source file where an error occurs?
Explain how can you be sure that a program follows the ansi c standard?
For what purpose null pointer used?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
What is int main () in c?
What is default value of global variable in c?
Can we declare function inside main?
What is a node in c?
What is the purpose of the statement: strcat (S2, S1)?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Where in memory are my variables stored?
Write a program to reverse a linked list in c.
What is a ternary operator in c?