I'm in trouble in this code with the fileContent variable.. I wish that the changes made by fileReader reallocation works fine in my main, but it doesn't work..
void fileReader(char *fileName, char *fileContent){
    FILE *inputFile = fopen(fileName, "r");
    int fileLength = 0;
    int endFlag = fgetc(inputFile);
    while(endFlag != EOF){
        fileContent = (char *) realloc (fileContent, (fileLength + 1) * sizeof(char));
        fileContent[fileLength] = endFlag;
        endFlag = fgetc(inputFile);
        fileLength++;
    }
}
int main(int argc, char const *argv[]){
    char *fileName = (char *) malloc (sizeof(char));
    char *taskStack = (char *) malloc (sizeof(char));
    char *fileContent = NULL;
    inputReader(fileName, taskStack);
    fileReader(fileName, fileContent);
    return 0;
}
 
    