I know you can print with printf()
and puts()
. I can also see that printf()
allows you to interpolate variables and do formatting.
puts
is the simple choice and adds a new line in the end and printf
writes the output from a formatted string.
See the documentation for puts and for printf.
I would recommend to use only printf
as this is more consistent than switching method, i.e if you are debbugging it is less painfull to search all printfs than puts
and printf
. Most times you want to output a variable in your printouts as well, so puts
is mostly used in example code.