main()
{int a=200*200/100;
printf("%d",a);
}
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / deepak roniya
explanation 7 is right......i also run this program and the
result is -255
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / vivek shah
because
int range 32767 to -32768
200*200=4000;
so out of range
-255
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / shafi
int a=200*200/100;/*it is related with assignment operator so
it's right->left shift*/
=200*2;
=400;
the value of a=400
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / tanvi jain
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 ? | 0 Yes | 0 No |
Answer / xxxxxxx
among '* ','/' arithematic operators / has a higher
precedence.so 200/100 is enclosed in brackets and multiplied
with 200
so a=200*(200/100)=200*2=400
| Is This Answer Correct ? | 0 Yes | 1 No |
a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static Which of the Following Statements are true w.r.t Bit-Fields A)a,b&c B)Only a & b C)Only c D)All
3 Answers Accenture, Digg.com,
What is meant by errors and debugging?
Is there any demerits of using pointer?
What is the difference between text files and binary files?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
what is a far pointer
12 Answers ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,
print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5
Tell me the use of bit field in c language?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What are the functions to open and close the file in c language?
When do we get logical errors?
what type of errors are checked during compilation