-
Notifications
You must be signed in to change notification settings - Fork 0
/
size.c
28 lines (26 loc) · 770 Bytes
/
size.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <stdbool.h>
int main (void) {
int _b = sizeof(_Bool);
int b = sizeof(bool);
int c = sizeof(char);
int s = sizeof(short);
int i = sizeof(int);
int f = sizeof(float);
int l = sizeof(long);
int ll = sizeof(long long);
int d = sizeof(double);
int st = sizeof(size_t);
int ld = sizeof(long double);
printf("_Bool: %d\n", _b);
printf("bool: %d\n", b);
printf("char: %d\n", c);
printf("short: %d\n", s);
printf("int: %d\n", i);
printf("float: %d\n", f);
printf("long: %d\n", l);
printf("long long: %d\n", ll);
printf("double: %d\n", d);
printf("size_t: %d\n", st);
printf("long double: %d\n", ld);
}