...

View Full Version : printf() and sprintf()



runeveryday
08-28-2009, 04:47 AM
i have read some tutorials about these,but still be confused.who can tell me the true difference between them? thank you!

whizard
08-28-2009, 06:09 AM
printf() returns an int, sprintf() returns a string.

Dan

Zangeel
08-28-2009, 08:21 AM
These functions format a string, printf will output it:


printf("%s, there!", 'Hello');
Output

Hello, there!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum