正在加载图片...
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  则1999yy, 10 mm, 15 dd 例 scanf(“%3d%*4d%f”,&k,&f); 输入 12345678765.43 则123k, 8765.43f 例 scanf(“%2d %*3d %2d”,&a,&b); 输入 12 345 67 则12a, 67b 例 scanf(“%3c%2c”,&c1,&c2); 输入 abcde  则‘a’c1, ‘d’ c2
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有