QUIZ 9

What will be the output?

a. infinite loop runs

b. -32767

c. -2147483647

d. either of b or c

Answer : d

Since, i is an int variable. This loop runs until maximum value of int is reached and loop terminates.

int has maximum positive range of 32768 and 2147483648 for 16 bit and 32 bit compilers. After this incrementation, results to minimum neagtive range i.e. -32767 or -2147483647.

Leave a Reply

Your email address will not be published. Required fields are marked *