Lesson 2.

This commit is contained in:
unlockable
2022-09-23 17:43:59 +08:00
parent 1bc763e78e
commit f3b0055aed
5 changed files with 100 additions and 0 deletions

12
02/Exercise01.c Normal file
View File

@@ -0,0 +1,12 @@
#include <stdio.h>
int main() {
short a = 10;
int b = 100;
int short_length = sizeof a;
int int_length = sizeof(b);
int long_length = sizeof(long);
int char_length = sizeof (char) ;
printf("short=%d, int=%d, long=%d, char=%d\n", short_length,
int_length, long_length, char_length);
return 0;
}