printf function: output a formatted string