I need to open a file that will be entered by the user and I don't know how to do this. I tried putting
Code:ifp= fopen("%s", "r", &filename); //also tried: ifp= fopen(filename, "r");
Code:printf("Enter the name of the file with the ticket data.\n"); scanf("%s", filename); FILE *ifp;
so what is the command you use to open a file based on user input that was stored in a variable filename?