You are on page 1of 10

MCQ Questions and Answers On Module-4 and Module-5

QUESTIONS ON MODULE-4

1)Shell Programming using read Command and Command Line


Arguments
The positional parameters are______
(A). special variables and patterns
(B). pattern matching parameters
(C). special variables to read user input
(D). From the command lines, the special variables for assigning
arguments
(E). None of these
Answer: d

2)The shell script is___


(A). File containing a series of commands
(B). File containing special symbols
(C). group of commands
(D). group of functions
(E). None of these
Answer: a

3)For storing the number of positional parameters, what is used?


(A). $n
(B). $*
(C). $#
(D). $2
(E). None of these
Answer: c

4)To make the scripts interactive, the ________ command is used.


(A). ip
(B). input
(C). write
(D). read
(E). None of these
Answer: d
5)The internal tool of a shell is the read command.
(A). False
(B). True
(E). None of these
Answer: b

6)In the separate child shell process, the shell script executes.
(A). True
(B). False
(E). None of these
Answer: a

7)With ____ first line of every shell script begins.


(A). &
(B). #
(C). $
(D). !
(E). None of these
Answer: b

8)By shell into the parameter, __ reads the first argument


(A). $1
(B). $3
(C). $$
(D). 1$
(E). None of these
Answer: a

9)____command is used to spawn a child of our own choice for running a


script.
(A). sh
(B). pr
(C). ps
(D). $$
(E). None of these
Answer: a
10) To shift arguments left we use ____ statement.
(A). set
(B). paste
(C). cut
(D). shift
(E). None of these
Answer: d

11)Any of the commands using standard input takes the input from here
document.
(A). False
(B). True
(E). None of these
Answer: b

12) The internal command in the following is_______


(A). set
(B). expr
(C). cut
(D). Is
(E). None of these
Answer: a

13) A filename is not accepted as an argument by which command?


(A). mailx
(B). ls
(C). paste
(D). cut
(E). None of these
Answer: a
14) do and the done keyword is used by which loop statements?
(A). for
(B). while
(C). for and while
(D). case
(E). None of these
Answer: c
15) with interactive programs, the here document can also be used.
(A). True
(B). False
(E). None of these
Answer: a

16) The program is interrupted by_________ command in appropriate


way.
(A). kill
(B). SIGKILL
(C). trap
(D). INT
(E). None of these
Answer: c

17) To perform a set of instructions repeatedly, Which commands are


used?
(A). for
(B). for, while, until
(C). until
(D). while
(E). None of these
Answer: b

18) To change filename extensions, which command do we use?


(A). chown
(B). rename
(C). rm
(D). basename
(E). None of these
Answer: d
19) To manipulate positional parameters the shell uses which command?
(A). cut
(B). set
(C). case
(D). paste
(E). None of these
Answer: b
20) In while loop which keywords are used?
(A). do and done
(B). done
(C). then
(D).do
(E). None of these
Answer: a
QUESTIONS ON MODULE-5

1) What is the daemon process?


(A). whose parent has died
(B). without any user interaction runs automatically
(C). which is running infinitely
(D). in the process table, it has completed its execution but still has an
entry.
(E). None of these
Answer: b

2) By using ___ we can list the jobs queued using at command.


(A). -p
(B). -l
(C). -v
(D). -r
(E). None of these
Answer: b

3) With a command, which option is used for removing a job from the
queue?
(A). -e
(B). -l
(C). -r
(D). -t
(E). None of these
Answer: c

4) Using a command, we can’t find the name of the program scheduled.


(A). False
(B). True
(C). Partially True
Answer: b
5) As soon as the system load permits, Which command gives permission
to schedule jobs for the later execution?
(A). batch
(B). %
(C). at
(D). cron
Answer: a

6) The jobs go to special at the queue, scheduled using the batch


command.
(A). True
(B). False
(C). Partially True
Answer: a

7) By using the __ option Jobs scheduled using batch command are


removed.
(A). -a
(B). -d
(C). -r
(D). -f
Answer: c

8) The cron is_____


(A). a daemon
(B). an orphan process
(C). a simple process
(D). a zombie process
Answer: a

9) A table having a list of commands that are scheduled to run at regular


intervals is the cron tab.
(A). False
(B). True
(C). Partially True
Answer: b

10) The current crontab will be removed by which command?


(A). crontab -r
(B). crontab -l
(C). crontab -e
(D). crontab -p
(E). None of these
Answer: a

11) Which of the following command is used to find out how efficiently
the system resources are used by a program?
(A). sys
(B). daemon
(C). crontab
(D). time
(E). None of these
Answer: d

12) The output of the given command will be?


$ ps -t dev/console
(A). undefined output
(B). The processes running on the terminal named console
(C). erroneous
(D). The processes running on current terminal
(E). None of these
Answer: b

13) To run the new program we use ___________ system call.


(A). exec
(B). wait
(C). fork
(D). exit
Answer: a
14) By fork, the system call which value is returned. When the child
process creation is unsuccessful?
(A). positive integer
(B). zero
(C). negative integer
(D). fractional value
(E). None of these
Answer: c
15) For displaying processes of a user, which of the following option is
used by the system administrator?
(A). -u
(B). -f
(C). -a
(D). -e
Answer: a

16) Some attributes of a process are shown by which command?


(A). pid
(B). $$
(C). HOME
(D). ps
(E). None of these
Answer: d

17) By ps command, which attribute is not shown?


(A). PID
(B). size
(C). tty
(D). PPID
(E). None of these
Answer: b
18) To wait for the child process to complete the parent process use
________ system call?
(A). wait
(B). exit
(C). fork
(D). exec
(E). None of these
Answer: d

19) For creating a new process Which system call is used?


(A). read
(B). new
(C). wait
(D). fork
(E). None of these
Answer: d

20) New PID is got from the child process that is created When the fork()
is invoked.
(A). True
(B). False
(C). Partially True
Answer: a

You might also like