// 24T3 COMP1511 Week 7 Lecture 1 // sizeof can tell us how many bytes our different types or variables // are stored in // We need to print it with %lu instead of %d #include struct point{ int x; int y; int z; }; int main(void) { printf("Size of an int: %lu bytes\n", sizeof(int)); printf("Size of char: %lu bytes\n", sizeof(char)); printf("Size of double: %lu bytes\n", sizeof(double)); printf("Size of 10 ints: %lu bytes\n", 10 * sizeof(int)); printf("Size of struct point: %lu bytes\n", sizeof(struct point)); printf("Size of a pointer: %lu bytes\n", sizeof(int *)); return 0; }