Question: what is the difference between printf and scanf?
Answer: Printf is for writing output. scanf is for reading input. ... Likewise, since scanf needs to modify variables, nearly all the parameters it receives (other than the format string) are pointers instead of values (though printf expects pointers in a few cases as well, such as %s and %n).