fraziss, try this exercise, compile/analyze until you KNOW *int is bad , even though it works (but won't work for other datatypes like doubles and such).
Code:
#include <stdio.h>
#include <stdlib.h>
struct Hello {
int t; // 4 bytes
double d; // 8 bytes
float f; // 4 bytes
};
int main(void)
{
struct Hello *Shello = malloc(1 * sizeof(*Shello));
/* Samething:
struct Hello *Shello = malloc(1 * sizeof(struct Hello));
struct Hello *Shello = malloc(sizeof(struct Hello)); */
printf("Sizeof *Shello: %d\n", sizeof(*Shello)); //16
printf("Sizeof struct Hello: %d\n", sizeof(struct Hello)); //16
printf("Sizeof Shello: %d\n", sizeof(Shello)); //4
printf("Sizeof *struct Hello: %d\n", sizeof(struct Hello *)); //4
printf("Sizeof double: %d\n", sizeof(double)); //8
printf("Sizeof *double: %d\n", sizeof(double *)); //4
/*
A pointer is always going to be 4 bytes because it is an integer.
*/
return 0;
}