l33.1a

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1A 代码 · 共 24 行

1A
24
字号
#printWrite a main program which counts the number of command-line argumentsit has which begin with the letter 'b'.  Print theresult in decimal.  Compile and test it as usual.Then type "ready".#usera.out abc bcd efg rpq b bbvd  >xxxgrep 3 xxx >/dev/null#succeed/*  a possible solution */main(argc, argv)char *argv[];{	int i, k;	for(i=k=0; i<argc; i++)		if (argv[i][0] == 'b')			k++;	printf("%d\n", k);}#log#next37.1a 10

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?