To handle printf-style formatting, you can us sprintf() to write the formatted string to a buffer, then use Serial.print() to output that.
…the Arduino version would need to be: int answer = 42 Where you might do something like: int answer = 42 These do not handle any character formatting like printf() does, but they can print strings, characters or numeric values in different formats. It provides functions such as: Serial.print() In Arduino, instead of being able to use things like printf() and puchar(), console output is done by using the Serial library routines.