printf functions:
The printf () function is a formatted output function that is typically used to output information to a standard output device in a prescribed format.
The printf () function is called in the format: printf ("< formatted string >", < Parameter table >).
#include <stdio.h>/*printf function printf ("< formatted string >", < Parameter table >)*/intMain () {intI=8, j=6; int*p=NULL; Char*name="thousand and Thousand seek"; CharPapa='Y'; intS1; P=&i; printf ("the first C program \ n"); printf ("%d%d\n", i,j);//d= output variable i,j displayed in decimal modeprintf"%p%p\n", &i,&j);//p= output Address%p=16 binary%d=10 binary in 16 binaryprintf"%d\n", *p);//d= The value of the output pointer address, displayed in decimal modeprintf"%s\n", name);//s= The characters in the output string, as to the end of theprintf"%c\n", Papa);//c= outputs a character, converted to the corresponding character in ASCII codeprintf"I love you%n\n", &S1);//%n Gets the number of output characters before the symbol, giving an int type variableprintf"%d\n", S1);//output%n the test obtainedSystem"Pause"); return 0;}
The first lesson of C basic usage of the printf function