main()
{int a=200*200/100;
printf("%d",a);
}

Answers were Sorted based on User's Feedback



main() {int a=200*200/100; printf("%d",a); }..

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 ?    24 Yes 2 No

main() {int a=200*200/100; printf("%d",a); }..

Answer / vignesh1988i

output is : 400

Is This Answer Correct ?    36 Yes 18 No

main() {int a=200*200/100; printf("%d",a); }..

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

main() {int a=200*200/100; printf("%d",a); }..

Answer / deepak roniya

explanation 7 is right......i also run this program and the
result is -255

Is This Answer Correct ?    10 Yes 1 No

main() {int a=200*200/100; printf("%d",a); }..

Answer / sreepal

-255

Is This Answer Correct ?    5 Yes 1 No

main() {int a=200*200/100; printf("%d",a); }..

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

main() {int a=200*200/100; printf("%d",a); }..

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

main() {int a=200*200/100; printf("%d",a); }..

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 ?    0 Yes 0 No

main() {int a=200*200/100; printf("%d",a); }..

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

main() {int a=200*200/100; printf("%d",a); }..

Answer / pawan singh

400

Is This Answer Correct ?    12 Yes 14 No

Post New Answer

More C Interview Questions

what is c programing

11 Answers   Wipro,


what is C?

9 Answers   Syntel,


what is const volatile?

2 Answers  


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

0 Answers  


How can I get random integers in a certain range?

0 Answers  






How can I invoke another program or command and trap its output?

0 Answers  


Explain how do you list files in a directory?

0 Answers  


Can anyone help me with this please? Need to print the below values.. Thanks 1 1 2 1 2 3 1 2 3 4

3 Answers  


how to find the kth smallest element in the given list of array elemnts.

8 Answers   Silicon,


program to find which character is occured more times in a string and how many times it has occured? for example in the sentence "i love india" the output should be i & 3.

3 Answers  


What are the types of pointers in c?

0 Answers  


write a function to find whether a string is palindrome or not and how many palindrome this string contain?

2 Answers   Aptech,


Categories