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 coding style can also be written as :-
char *foo = (char *)malloc(1 * someDynamicAmount);
But this is done so that the dynamically allocating memory can be increased according to the no of basic data type one wants. if u wanna increase 100 char it will increase 100 char. If may not have need but if we write 101 or 102 doing that would waste memory. doing the it according to the basic data type would not waste any memory space