Lesson 2.
This commit is contained in:
12
02/Exercise01.c
Normal file
12
02/Exercise01.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user