allocating memory for 1Mb text file in C

C
    char *one_MB_file = (char*) malloc(sizeof(char));
Source

Also in C: