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

1 Answer

0 votes
#include <stdio.h> 
#include <limits.h>

int main(void)
{   
    printf("%d\n", (int)sizeof(long));
    printf("%ld\n", LONG_MAX);
    printf("%ld\n", LONG_MIN);
	
    return 0;
}

   
/*
run:

4
2147483647
-2147483648

*/

 



answered Dec 11, 2016 by avibootz

Related questions

1 answer 190 views
1 answer 231 views
1 answer 177 views
1 answer 153 views
...