man scanf
should give you the full list of identifiers and their description.
Anyway, none of your attempts works because the first %s
will eat everything until it finds a whitespace. This is the default behavior. You need to use %[^=]
in the first format specifier:
sscanf(line, "%[^= ] = %s", parameter_name, parameter_value);