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

1 Answer

0 votes
#include <stdio.h> 
#include <limits.h> 
 
int main(void)
{   
    printf("%d\n", (int)sizeof(unsigned long));
    printf("%d\n", 0); // min
    printf("%lu\n", (unsigned long)ULONG_MAX);
     
    return 0;
}
 
    
/*
run:
 
4
0
4294967295

*/

 



answered Dec 11, 2016 by avibootz

Related questions

...