I have the following script:
typedef struct {
uint8_t red;
uint8_t green;
uint8_t blue;
} color;
color c1;
color* c2 = malloc(sizeof(color));
I would like to know where c1 and c2 are stored. I know malloc stores on the heap, but c2 is a pointer and those get stored on the stack? And is c1 stored on either the heap or the stack?