allocating memory to string when entered in c code example Example: allocating memory for 1Mb text file in C char *one_MB_file = (char*) malloc(sizeof(char));