what can we do with sprintf????

i just want to know about what is the difference between printf and sprintf?? can anybody give me examples will be useful

On the Arduino, use Serial.print(..) or Serial.println(..) rather than printf()

sprint() found here:
http://www.cplusplus.com/reference/cstdio/sprintf/

printf prints to an output stream (stdout). What is that on an Arduino ...?

sprintf prints into a string (character array) and is incredibly useful for generating nicely formatted displays and tables, etc.

majenko:
printf prints to an output stream (stdout). What is that on an Arduino ...?

It's possible to hook up the stdin, stdout, stderr streams to Arduino I/O channels but by default they are not connected. (If you were using printf() extensively, it would be worth the extra effort to connect stdout and avoid the coding and runtime cost of formatting each message into a buffer before outputting it.)

Simple tutorial