How exactly do I take an input from a file in C?
As in, for instance: Say i assigned a file pointer to a particular file and want to peform certain operations. What exactly is the syntax for assigning the file pointer Assume the file, is located at C:\Acads\bin\File.txt. In my code when I try this
FILE *fp1;
fp1=("C:\Acads\bin\File.txt","r+");
It ends up giving me an error.
UPDATE: Okay so here is my main doubt.
How exactly do i tell the compiler that my file is located at so and so path. I've tried doing everything you guys have told me but to no avail.
printf("The file is named %s\n", "C:\Acads\bin\File.txt");:)