I want to read a line from file in C. Eg in file I have following data
"It was a good
day
but suddenly
everything"
Rightnow, my code just reads line by line but as mentioned in above example I want to read data from the starting inverted commas (") till the ending inverted commas (") and then write that whole string (like "It was a good day but suddenly everything") into another file. i only need help in reading these above lines from starting inverted commas till ending inverted commas. Please guide me which functions in C will help me to do that.
Rightnow, I am just reading data line by line
FILE *file = fopen ( filename, "r" );
if (file != NULL )
{
char line [1000];
while(fgets(line,sizeof line,file)!= NULL) /* read a line from a file */
{
//do something
}
}