I was doing some C coding and after reading some C code I\'ve noticed that there are code snippets like
char *foo = (char *)malloc(sizeof(char) * someDynamicAmo
The common idiom is
T *p = malloc(N * sizeof *p);
or
T *p; ... p = malloc(N * sizeof *p);
This way you don't have to worry about the type.