原型
会将输入的数据根据参数format字符串来转换并格式化数据,病假
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
int scanf(const char * format,.......);
|
使用参考
1 2 3 4 5 6 7 8 9 10 11 12
| #include <stdio.h>
int main() { int i; unsigned int j; char s[5]; scanf("%d %x %5[a-z]s", &i, &j, s); printf("参数打印i:%d j:%d s:%s\n", i, j, s);
return 0; }
|