1. Most commonly used scanf and printf, to include header files Stdio.h
1.1 Output printf
Format: printf ("< formatted string >", < parameter table >)
1.1.1 "" contains a string of 3 object types
* Unformatted characters are copied directly to the output stream that is the general character direct output
* Output by corresponding data type with a format character such as:%d-integer%s-string
* Escape character is output by escaping, e.g. \ n output carriage return, \ t output tab
1.1.2 Control Display Value width
1 intx = -;2printf"x=%1d", x);//Output x=183printf"x=%3d", x);//Output x=4printf"x=%5d", x);//Output x=5 6printf"X=%-1dt", x);//Output x=18t7printf"X=%-3dt", x);//Output x=18 T8printf"X=%-5dt", x);//Output x=18 T9 Ten Doublex =1.5; Oneprintf"x=%ft", x);//Output x=1.500000t Aprintf"x=%10ft", x);//Output x= 1.500000T -printf"x=%10.3ft", x);//Output x= 1.500T - theprintf"x=%-8.3ft", x);//Output x=1.500 T -printf"x=%-ft", x);//Output x=1.500000t -printf"x=%-2.2ft", x);//Output x=1.50t
1.2 Input scanf
Format: scanf ("< format description string >",< variable address >);
1.2.1
C-based input and output functions