l15.1b
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1B 代码 · 共 41 行
1B
41 行
#printWrite a program that reads in lines, and prints each outin reverse order (except that the newline should beat the end).Thus the linecat foodshould come out asdoof tacCompile it and run it, then type "ready".#once #create Ref1This is odd.This is even.#once #create Ref2.ddo si sihT.neve si sihT#once cp %s/getline.o .#usera.out <Ref1 >x1#cmp x1 Ref2#succeed/* one way to do this */ #include <stdio.h>main(){ char line[500]; int n; while ((n = getline(line, 500)) > 0) { for (n -= 2; n >= 0; n--) putchar(line[n]); putchar('\n'); }}#log#next17.1a 1016.2a 5
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?