short int in c programming langauge

Data types in c language: short integer  

Size of short is two byte in the 16 bit compilers like turbo c++, Borland c++ as well as 32 bit compilers like Linux gcc compiler. In Turbo c compiler size of both short int and int is two byte. Hence there is not so importance of short int Turbo c compiler but in Linux gcc compiler size of short int is two byte while size of int is four byte. Since memory is too costly, hence we generally use short int instead of int when we are not using data beyond two byte. A short int may be unsigned or signed. Memory representation of unsigned short int and signed short int will same as unsigned int and signed int in 16 bit compilers.    

Post a Comment