1.

Which data type is most suitable for storing a number 65000 in a 32-bit system?(a) signed short(b) unsigned short(c) long(d) intThe question was asked by my college director while I was bunking the class.Question is from Data Types and Sizes in section Data Types, Operators and Expressions in C of C

Answer» CORRECT option is (b) UNSIGNED short

The best I can explain: 65000 comes in the range of short (16-bit) which occupies the LEAST memory. SIGNED short ranges from -32768 to 32767 and hence we should use unsigned short.


Discussion

No Comment Found

Related InterviewSolutions