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

int i=0,j; j=++i + ++i ++i; printf(" %d",j);

2 Answers   ME,


Tell me the use of bit field in c language?

0 Answers  


find the minimum of three values inputted by the user

3 Answers  


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

0 Answers  


what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7

4 Answers   TCS,






what are the stages of compilation

1 Answers   Bosch,


code for selection sort?

1 Answers  


#include<conio.h> #include<stdio.h> void main() { int i; if(1,0,2,3) { printf("if"); } else { printf("else"); } getch(); } Can any body tell the answer of this question with explanation?

3 Answers   Huawei,


How do we make a global variable accessible across files? Explain the extern keyword?

0 Answers  


WHAT IS HIGH LEVEL LANGUAGE?

2 Answers  


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

0 Answers   Ignou,


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

0 Answers  


Categories