All Free Software Engineering MCQs with Answers

Every Software Engineering question in the bank, across all chapters, each with the correct answer and a written explanation. Free and unlimited, with no account needed.

1,731 questions · page 43 of 87

  • A. standard input file
  • B. standard output file
  • C. both input and output file
  • D. neither standard input nor standard output file

Explanation: cp copies data from named source files to named destination files and does not normally read from standard input or write to standard…

Correct answer: neither standard input nor standard output file
  • A. cd
  • B. od
  • C. of
  • D. oct

Explanation: The od command, meaning octal dump, displays file data in octal and other selectable formats.

Correct answer: od
  • A. S
  • B. s
  • C. r
  • D. C

Explanation: In vi, s substitutes the character under the cursor and enters text-insertion mode, allowing new text to be typed.

Correct answer: s
  • A. rename
  • B. delete
  • C. rm
  • D. cp

Explanation: rm removes files from a Unix filesystem, while cp copies them and rename is not the standard Unix deletion command.

Correct answer: rm
  • A. lp
  • B. pg
  • C. prn
  • D. print

Explanation: lp is the traditional Unix command for sending a file to a line printer or print queue.

Correct answer: lp
  • A. w
  • B. e
  • C. a
  • D. b

Explanation: In vi, `b` moves the cursor backward to the beginning of the current or previous word.

Correct answer: b
  • A. countw
  • B. wcount
  • C. wc
  • D. count p

Explanation: `wc` means word count and reports the number of lines, words, and bytes or characters in a file.

Correct answer: wc
  • A. capture a file
  • B. display a file
  • C. print a file
  • D. copy a file

Explanation: `cat` reads a file and writes its contents to standard output, so it is commonly used to display a file in the terminal.

Correct answer: display a file
  • A. x
  • B. X
  • C. dd
  • D. D

Explanation: In vi command mode, `x` deletes the character at or beneath the cursor.

Correct answer: x
  • A. 1024 bytes
  • B. 2048 bytes
  • C. 512 bytes
  • D. 256 bytes

Explanation: Traditional Unix file systems use physical disk blocks of 512 bytes, although modern Unix-like systems may use different block sizes.

Correct answer: 512 bytes
  • A. erase
  • B. delete
  • C. rm
  • D. dm

Explanation: The `rm` command removes files and, with suitable options, directories.

Correct answer: rm
  • A. chmod go+r note
  • B. chmod a-rw
  • C. chmod ugo=r note
  • D. chmod u+r,g+r,o-x note

Explanation: `chmod ugo=r note` assigns read permission to the user, group, and others while removing write and execute permissions.

Correct answer: chmod ugo=r note
  • A. mesg
  • B. grep
  • C. halt
  • D. sleep

Explanation: `mesg` controls whether other users may send messages to a terminal, with `mesg n` restricting incoming messages.

Correct answer: mesg
  • A. rename
  • B. remove
  • C. mv
  • D. ren

Explanation: Unix uses `mv` both to move a file and to rename it when the destination is in the same directory or has a new name.

Correct answer: mv
  • A. group has read permission only
  • B. other has read permission only
  • C. owner has read permission only
  • D. group has write permission only

Explanation: Unix permissions are grouped as owner, group, and others, in that order.

Correct answer: group has read permission only
  • A. ls -1
  • B. ls -t
  • C. ls -i
  • D. ls -R

Explanation: The `-t` option sorts directory entries by modification time, showing the most recently modified files first.

Correct answer: ls -t
  • A. $!
  • B. $#
  • C. 0
  • D. $*

Explanation: The special variable `$!` expands to the process ID of the most recently started background job.

Correct answer: $!
  • A. remove
  • B. rm
  • C. mv
  • D. del

Explanation: `rm` is the standard Unix/Linux command for removing files. `mv` moves or renames a file, while `remove` and `del` are not the standard…

Correct answer: rm
  • A. ^pat
  • B. $pat
  • C. pat$
  • D. pat^

Explanation: In grep regular expressions, `^` anchors a pattern to the beginning of a line, so `^pat` matches lines that start with `pat`.

Correct answer: ^pat
  • A. chmod go+r note
  • B. chmod go+rw note
  • C. chmod go-x note
  • D. chmod go-r note

Explanation: In `chmod`, `go` selects the group and others classes, while `-r` removes read permission, making `chmod go-r note` the required command.

Correct answer: chmod go-r note