scanf vs sscanf vs fscanf code example
Example: difference between fscanf and sscanf
scanf reads from the standard input stream stdin.
fscanf reads from the named input stream.
sscanf reads from the character string s.
Each function reads characters, interprets them according
to a format, and stores the results in its arguments.