Just wondering, I have allocated memory using malloc
without a cast. e.g
char *ptr = malloc(26);
It's compiling successfully with GCC without an error. Is it safe to allocate memory using this expression?
Also, Is there any difference between following expression?
char *ptr = malloc(26);
and
char *ptr = (char*) malloc(26 * sizeof(char));