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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1481


Write a code to remove duplicates in a string.

629


what are non standard function in c

1438


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

1863


Is there a built-in function in C that can be used for sorting data?

745






There seem to be a few missing operators ..

620


What are identifiers c?

566


How do you define structure?

567


What is a spanning Tree?

957


When should you not use a type cast?

661


Explain two-dimensional array.

631


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

837


What is the difference between char array and char pointer?

527


How can I dynamically allocate arrays?

594


What is the purpose of void pointer?

599