第 11 章 字符串和字符串函数(命令行参数)
1 /*--------------------------------------- 2 repeat.c -- 带参数的 main() 3 ---------------------------------------*/ 4 5 #include <stdio.h> 6 7 int main(int argc, char *argv[]) 8 { 9 printf("The command line has %d arguments:\n", argc - 1); 10 11 for (int count = 1; count != argc; ++count) 12 printf("%d: %s\n", count, argv[count]); 13 14 printf("\n"); 15 16 return 0; 17 }repeat.c
相关推荐
dxbjfu0 2020-09-11
bluecarrot 2020-08-19
zhaobig 2020-06-25
xiaohouye 2020-04-20
83520298 2020-04-16
rechanel 2020-02-28
站在高处眺望 2020-02-20
tydldd 2020-02-09
83520298 2020-01-26
83520298 2020-01-24
sunnyJam 2020-01-12
yuzhongdelei0 2019-12-31
tomson 2019-12-14
80304053 2019-12-10
qingshuoyisheng 2013-09-16
89961330 2019-11-16
invokerzhang 2019-11-10
xiejianming 2010-12-19