Best answer by Gordon
If you're learning C, you have (or ought to have) a copy of the book by Kernighan and Richie.
Page 157 is the start of a section on "Formatted Input - scanf". You should start there.
If you don't have K&R, I'd say "order it today".
Back in the early 1980s, I kept a box of copies of K&R in my office to give to all new programming hires.