Mega Code Archive

 
Categories / C Tutorial / Printf Scanf
 

The printf Function

printf displays information on screen. printf returns the number of characters printed. printf displays the text you put inside the double quotes. printf requires the backslash character - an escape sequence - to display some special characters. printf can display variables by using the % conversion character. printf format: a string argument followed by any additional arguments. #include <stdio.h> main() {     int i = 0;          i=printf("abcde\n");             printf("total characters printed %d\n",i); } abcde total characters printed 6