l16.2b

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

2B
41
字号
#printWrite a program which copies all lines containngthe letter 'p' from its input to its output.Compile and test it; then type "ready".#once #create Refmountain station south orange maplewood millburn short hillsnew providence murray hill berkeley heightsbernardsville far hills peapack gladstone#once #create badinhoboken harrison newark roseville avenue grove streeteast orange brick church orange highland avenuemountain station south orange maplewood millburn short hillssummit chatham madison convent station morristownnew providence murray hill berkeley heightsgillette stirling millington lyons basking ridgebernardsville far hills peapack gladstone#once cp %s/getline.o .#usera.out <badin >xxx#cmp Ref xxx#succeed/*	a way to find lines with 'p' */ #include <stdio.h>main(){	char line[500];	int k;	while (getline(line, 500) > 0)		for (k = 0; line[k] != '\0'; k++)			if (line[k] == 'p') {				printf("%s", line);				break;			}}#log#next16.2c 517.1a 10

⌨️ 快捷键说明

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