Q:

What does '%8.1fC\n' mean?

I wanted to know the purpose of a percent inside a string with 8.1. Your help will be appreciated thanks.

A:

%8.1f is a format specifier.  This should point you in the right direction for figuring out what all the parts mean.  It specifies the format in which a variable will be printed.  In this specific case, it is a place-holder for a floating point variable.  It reserves a width of at least 8 characters and a precision of 1.
For more information, do some research on format specifiers.  It's an extremely well documented and widely available topic for virtually every programming language.

