How to get the size, the min and the max of unsigned short Data Type in C

1 Answer

0 votes
#include <stdio.h> 
#include <limits.h> 
 
int main(void)
{   
    printf("%d\n", (int)sizeof(unsigned short));
    printf("%d\n", 0); // min
    printf("%d\n", USHRT_MAX);
     
    return 0;
}
 
    
/*
run:
 
2
0
65535

*/

 



answered Dec 11, 2016 by avibootz

Related questions

...