What formatting works with printf(), will work with fprintf(), and the formatting that works with scanf(), will also work with fscanf(), and sscanf(), etc.
Nearly all of the printf() formats, also work the same in scanf().
There are a LOT of formats for each of these. The right format for your program, depends on exactly how you want your numbers to be formatted.
Try man scanf in your Linux terminal, or fscanf formats in Google, or the help file in your C ide.
Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185