C input/output

From wikinotes
Revision as of 01:16, 14 June 2016 by Will (talk | contribs) (Created page with "The basics. How to print, how to format strings, etc. = outputs = <blockquote> <syntaxhighlight lang="c"> puts( "my string" ); // print printf( "my string" ); // like on...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The basics. How to print, how to format strings, etc.

outputs

puts(   "my string" );		// print
printf( "my string" );		// like on shell, printf does not end line

string formatting

int num = 6;
printf( "my num is: %d", num );		// picky on type( %d, %s, ...)