Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET

Connect with Universities & Study Abroad Instantly Search University


Suppose that x is initialized as:

	short int x; /*assume x is 16 bits in size*/
	What is maximum number that can be printed using
A 127
B 128
C 255
D 32767
Answer & Explanation
Option: [D]

By default short integer is signed. 1 bit is reserveed for sign i.e. only 15 bits are available.

So, the largest number will be:

215+214+..........+upto 20

i.e. 32767

Your Valuable Comments Please...

Useful Computer Science EBooks