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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

640


What are predefined functions in c?

572


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

1962


What type is sizeof?

592


How many parameters should a function have?

670






PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

1476


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

3343


What is dynamic dispatch in c++?

563


Why is %d used in c?

569


What is wrong with this program statement? void = 10;

828


What is scanf_s in c?

637


What are the properties of union in c?

596


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

687


Can you write a programmer for FACTORIAL using recursion?

618


What is the use of gets and puts?

608