The C Programming language Chapter 4 Input and Output Modifies Modifies Functions Use before d, o,x. specifies short int Use before d, o, x. specifies long int Use before e, f. specifies double Specifies the maximum field width * Assignment suppression character, the input field is skipped 例 scanf(%3c%2c”,&cl,&c2); 输入 abcde d 1.d→c2The C Programming Language Chapter 4 Input and Output Modifies l Modifies Functions h m * Use before d,o,x,specifies short int Use before d,o,x,specifies long int Use before e,f,specifies double Specifies the maximum field width Assignment suppression character,the input field is skipped 例 scanf(“%4d%2d%2d”,&yy,&mm,&dd); 输入 19991015 则1999yy, 10 mm, 15 dd 例 scanf(“%3d%*4d%f”,&k,&f); 输入 12345678765.43 则123k, 8765.43f 例 scanf(“%2d %*3d %2d”,&a,&b); 输入 12 345 67 则12a, 67b 例 scanf(“%3c%2c”,&c1,&c2); 输入 abcde 则‘a’c1, ‘d’ c2