Created
February 2, 2017 15:00
-
-
Save jrelo/0ad27cdf45f42db4298032cff1ae4316 to your computer and use it in GitHub Desktop.
var limits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <limits.h> | |
int main() { | |
printf("The number of bits in a byte %d\n", CHAR_BIT); | |
printf("The minimum value of SIGNED CHAR = %d\n", SCHAR_MIN); | |
printf("The maximum value of SIGNED CHAR = %d\n", SCHAR_MAX); | |
printf("The maximum value of UNSIGNED CHAR = %d\n", UCHAR_MAX); | |
printf("The minimum value of SHORT INT = %d\n", SHRT_MIN); | |
printf("The maximum value of SHORT INT = %d\n", SHRT_MAX); | |
printf("The minimum value of INT = %d\n", INT_MIN); | |
printf("The maximum value of INT = %d\n", INT_MAX); | |
printf("The minimum value of CHAR = %d\n", CHAR_MIN); | |
printf("The maximum value of CHAR = %d\n", CHAR_MAX); | |
printf("The minimum value of LONG = %ld\n", LONG_MIN); | |
printf("The maximum value of LONG = %ld\n", LONG_MAX); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment