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 ? | 25 Yes | 2 No |
Post New Answer View All Answers
What is function prototype in c with example?
What is the process to generate random numbers in c programming language?
Is c is a middle level language?
What is non linear data structure in c?
How can a string be converted to a number?
Why use int main instead of void main?
Why c is called free form language?
What are the characteristics of arrays in c?
How can a program be made to print the name of a source file where an error occurs?
How pointers are declared?
Is null always defined as 0(zero)?
What is identifier in c?
Tell me when is a void pointer used?
Explain what is operator promotion?
Why doesnt that code work?