cool
This commit is contained in:
parent
4e8af7e835
commit
d58c7addf2
1 changed files with 16 additions and 6 deletions
22
02/02_33p.c
22
02/02_33p.c
|
|
@ -1,11 +1,21 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
printf("char: %zu byte\n", sizeof(char));
|
||||
printf("int: %zu bytes\n", sizeof(int));
|
||||
printf("long: %zu bytes\n", sizeof(long));
|
||||
printf("long long: %zu bytes\n", sizeof(long long));
|
||||
printf("pointer: %zu bytes\n", sizeof(void*));
|
||||
printf("int: %zu bytes\n", sizeof(int));
|
||||
printf("short: %zu bytes\n", sizeof(short));
|
||||
printf("long: %zu bytes\n", sizeof(long));
|
||||
printf("long long: %zu bytes\n", sizeof(long long));
|
||||
|
||||
return 0;
|
||||
printf("float: %zu bytes\n", sizeof(float));
|
||||
printf("double: %zu bytes\n", sizeof(double));
|
||||
printf("long double: %zu bytes\n", sizeof(long double));
|
||||
|
||||
printf("char: %zu bytes\n", sizeof(char));
|
||||
|
||||
char ch = 'A';
|
||||
printf("\n%c %d", ch, ch);
|
||||
ch += 32;
|
||||
printf("\n%c %d", ch, ch);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue