Question: why is fprintf function used?
Answer: The fprintf function is used for printing information to the screen. The fprintf function prints an array of characters to the screen: ... To "place" a number into this string of printed characters we use several formatting options, but they all start with a % sign.