22-23 秋冬历年卷

历年考卷整理:22-23 秋冬学期
阅读说明
  • 正文按原卷顺序排列,题号与原卷一致(原卷填空题从 2 开始编号,没有 1 和 7)
  • 题干照抄原卷,填空题的空格写作 (2)___,选择题按原卷顺序补上 A–D
  • 绿色的「答案」块里是答案和补充讲解,默认遮住,点一下查看单个答案;也可以

原卷(回忆版)

A. Fill in the Blanks

题目

Fill in the blanks in English. (25 points, less than half if in Chinese)

The name of Unix directory “/dev” is from a word (2)___, “/bin” is from a word (3)___; while “src” often means (4)___.

Command “if -r $FILE” in bash judges whether a file exists and is (5)___.

While in vi’s insert mode, pressing (6)___ key could help return to command mode.

While linking with static X Window library, “-lX11” means the needed library should be a file called (8)___.

We met “lazy dog” in our homework task of doing (9)___ practices.

A command “kill -9 3721” means the “kill” program sends a #9 signal to a (10)___ with PID of 3721.

A special macro “$@” inside a makefile rule stands for this rule’s current (11)___.

In text-based ftp client program, the letter “l” in a command “lcd” likely means (12)___; the letter “!” in a command “!pwd” means (13)___.

The “@” in a Perl variable name “@ages” indicates this variable is of (14)___ type.

(15)___ is a program running tutorial for vim; it has 7 lessons for students learning with.

While “.c” is a common suffix for C source code file, “.o” is usually for (16)___ file; and (17)___ is a common suffix for Perl source code file; (18)___ is a common suffix for Python source code file; (19)___ is a common suffix for assembly source code.

Each letter in EDA stands for (20)___, (21)___, and (22)___; each letter in CAD stands for (23)___, (24)___, and (25)___.

B. Single Choice

题目

Choose single answer from candidate choices. (30 points)

26. ‘yy4p’ in vi command mode means to:

A. delete 4 lines B. duplicate 4 lines C. move cursor down 4 lines D. move cursor up 4 lines

27. The interpreter program of Tcl/TK scripts:

A. wish B. bash C. tk D. tcl

28. Interpreter program of Perl scripts:

A. python B. Perl C. sh D. perl

29. A company was famous for its copying machine products:

A. Xerox B. Intel C. Texas Instrument D. IBM

30. Key stroke for moving cursor position down a full page in vi:

A. ^f (ctrl-f) B. ^u (ctrl-u) C. ^d (ctrl-d) D. ^b (ctrl-b)

31. It is the world’s largest ICCAD company in year 2022:

A. Cadence B. Synopsys C. Synopsis D. Candence

32. Command can give a Unix command an additional name:

A. remove B. move C. alias D. rename

33. Command option to tell ‘gcc’ about position information of header (.h) file:

A. -h B. -H C. -L D. -l

34. ‘:s/Oct\./Nov./’ in vi command line mode performs:

A. subroutine calling B. subtraction C. substitution D. saving file

35. A Class-B IP address:

A. 127.0.0.1 B. 135.0.1.1 C. 192.168.0.1 D. 10.10.0.21

36. A shell command has different effects than the other 3 commands:

A. cd B. cd ~ C. cd $HOME D. cd $PWD

37. The “-Rt” in a command “ls -Rt” means:

A. recursively, table orderly B. recursively, time orderly C. reversely, table orderly D. reversely, time orderly

38. A disk partition has its free-space information in:

A. super block B. symbolic bock C. data block D. inode

39. Command that can NOT display contents of a plain text document:

A. tail B. ls C. head D. cat

40. Super User of Unix system is also known as:

A. minister B. boss C. hacker D. root

41. GNU GPL is a technical term most-likely related to:

A. software license B. graphics C. debugger D. source code complier

42. While using “more” to browse a document, pressing this key could exit the browsing:

A. x B. e C. q D. b

43. Code version control tool “git” is developed under:

A. Bill Joy B. Steve Wozniak C. Bill Gates D. Linus Torvalds

44. Unix system time can be changed by command program:

A. date B. sleep C. xclock D. time

45. Key stroke for moving cursor position up in vi:

A. ^c (crtl-c) B. ^d (ctrl-d) C. j D. k

46. It is a network protocol, but NOT on Application Layer:

A. X Window B. TCP C. NFS D. FTP

47. To repeat last command in shell, type:

A. $ B. !! C. . D. -1

48. Key stroke pair can pause-resume output display of a shell program (where ^ stands for Ctrl key):

A. ^Q-^S B. ^Z-^C C. ^C-^Z D. ^S-^Q

49. Who always listens to a network port and waits to provide network service:

A. devil B. daemon C. ghost D. agent

50. Honored as inventor of C language:

A. Richard Stallman B. Ken Thompson C. Bill Joy D. Dennis Ritchie

51. This Unix program can locate a command’s position in the file tree:

A. who B. where C. whatis D. which

52. A C function ‘strcasecmp()’ is different from another function ‘strcmp’ in handing:

A. character number B. string length C. string boundary D. character case

53. When Linux was first mentioned, Linus Torvald was a student in:

A. U.S.A. B. Switzerland C. Canada D. Finland

54. Output file finally generated by command ‘gcc tri.c -lm’:

A. math.h B. tri.o C. libm.a D. a.out

55. To find a certain word inside a file, we can use program:

A. Find B. find C. grab D. grep

C. Describe Unix Commands

题目

Accurately describe each Unix command and its usage in English: the main function and command line syntax of each Unix command. (18 pts, scoring half if in Chinese, but extra explanation in Chinese is very welcome)

一个两分。

56. cut

57. mkdir

58. umount

59. xterm

60. cp

61. top

62. du

63. paste

64. ping

D. Explain Command Lines

题目

Explain the meanings of ALL fields (ALL words and symbols) of the command line in reasonable details; then explain the purpose of the whole command line. (12 pts, in Chinese OK)

65. find $INC -name std*.h | tee hlist #(~7 fields + whole line)

66. make -f makefile.bit clean; touch demo_bit.c; make -nf makefile.bit #(~7 fields + whole line)

67. export PATH=`pwd`/fake_bin:$PATH; echo $PATH; #(~6 fields + whole line)

68. tar xvf core.tar . ; chmode 764 * #(~8 fields + whole line)

E. Short Answers

题目

Answer questions in reasonable details. (15 pts, in Chinese OK if not required in English)

69. How to pronounce the project name GNU in English? Why technically we prefer to call our Linux system a GNU/Linux system?

70. Write a shell program ‘evenarg5.bash’ that prints out 5 times the command line arguments on even number positions (e.g., arg2, arg4, arg6, …). The program should be able to take unlimited number of arguments. Please describe the program flow first and give enough comments along the code. Magic Symbol is needed too.

71. If you have a Linux computer and a Microsoft Windows computer, an ICCAD software is running on the Linux computer and you want to see its GUI on the Windows computer, what details you should prepare to do?

72. Explain the function of this Perl command line “$str =~ /(([\w._-]+)@([\w._-]+))/” in detail.

F. 附加题

73. 试谈一谈如何从各个角度理解集成电路设计工程师需要”expertise in Perl, Tcl, UNIX shell, Makefiles, C, C++ and etc.”?

74. How to pronounce the following meta-characters in spoken technical English?

/ \ * @ ( {

System Development Tools
20-21 历年卷

评论区