26 lines
877 B
C
26 lines
877 B
C
#include <limits.h>
|
|
#include <stdio.h>
|
|
|
|
enum boolean { NO, YES };
|
|
|
|
int main() {
|
|
printf("\nINTEGER TYPES:\n");
|
|
printf("%-20s%ld bytes wide\n", "char: ", sizeof(char));
|
|
printf("%-20s%ld bytes wide\n", "int: ", sizeof(int));
|
|
printf("%-20s%ld bytes wide\n", "short int: ", sizeof(short int));
|
|
printf("%-20s%ld bytes wide\n", "long: ", sizeof(long));
|
|
printf("%-20s%ld bytes wide\n", "long int: ", sizeof(long int));
|
|
printf("%-20s%ld bytes wide\n", "long long int: ", sizeof(long long int));
|
|
|
|
printf("\nFLOATING POINT TYPES:\n");
|
|
printf("%-20s%ld bytes wide\n", "float: ", sizeof(float));
|
|
printf("%-20s%ld bytes wide\n", "double: ", sizeof(double));
|
|
printf("%-20s%ld bytes wide\n", "long double: ", sizeof(long double));
|
|
|
|
#if defined(__STDC_VERSION__)
|
|
printf("\n%ld\n", __STDC_VERSION__);
|
|
#endif
|
|
printf("\nseveral " "string " "constants.\n");
|
|
return 0;
|
|
}
|