I have fscanf to read lines of setting from a configuration file. Those settings have strictly predefined format which looks like
name1=option1; name2=option
This will work:
fscanf(configuration,"%[^=]=%[^;];%[^\n]",name,option,dummy);
You will have to consume the new line character.Otherwise,the newline is left in the input stream.