Why doesn’t sprintf() output anything?

sprintf() returns a string, printf() displays it.

The following two are equal:

printf(currentDateTime());
print sprintf(currentDateTime());

Leave a Comment