so I'm trying to get a string from a file that is in quotation marks and has a space between the two words so something like this "john doe" and I'm trying to save it into a single string variable, but instead, fscanf only saves the first word, I was wondering how can I save both words into one variable instead of 2
data.txt
"john doe"
main.c
FILE * infile = fopen("data.txt","r");
if(infile == NULL){
printf("error");
return -1;
}
char username[20];
fscanf(infile, "%s", username);