main()
{int a=200*200/100;
printf("%d",a);
}
Answer Posted / pravin
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 (-24435/100)="-244"(integer value).
thank u
| Is This Answer Correct ? | 26 Yes | 10 No |
Post New Answer View All Answers
How to declare pointer variables?
What is a MAC Address?
Can we declare function inside main?
Why main function is special give two reasons?
Why do we need arrays in c?
How do we make a global variable accessible across files? Explain the extern keyword?
Difference between exit() and _exit() function?
What are reserved words with a programming language?
What is c definition?
What is this infamous null pointer, anyway?
What is the use of sizeof?
What is the use of pragma in embedded c?
How macro execution is faster than function ?
Why isnt any of this standardized in c?
What is meant by recursion?