Top 80+ Solved Unix Operating System MCQ Questions Answer
Q. Which of the following assignments is illegal
a. a=’ls’
b. b=’ls –l’
c. c=’1972’
d. d=’who | grepaal’
Q. Which of the following assignment is illegal
a. a=’cat file’
b. a=100 b=50
c. age=25
d. all the above
Q. The shell metacharacter $# represents
a. total number of arguments supplied to the shell script
b. total number of files in the current directory
c. total number of users who have logged in
d. total number of processes running in the background
Q. When we are executing a shell script the shell acts as
a. an interpreter
b. a compiler
c. an operating system
d. none of the above
Q. On executing a statement set -3+1
a. $1 would be -3
b. $1 would be –
c. $1 would be set
d. this command would result into an error
Q. On executing the command Shift $v
a. the positional parameters would be shifted by the value of the variable v
b. the positional parameters would be shifted by 1
c. the positional parameters would not be shifted at all
d. this command would result into an error
Q. Which of the following shows the correct hierarchy of arithmetic operations in shell
a. (),**,* or /, + or –
b. (), **, *,/,+,-
c. (),**,/,*,+,-
d. (),/,% or *,- or +
Q. Which of the following is allowed in an arithmetic statement involving exprinstruction
a. []
b. {}
c. ()
d. none of the above
Q. Hierarchy decides which operator
a. is most important
b. is used first
c. is fastest
d. operates on largest numbers
Q. The break statement is used to exit from
a. an if statement
b. a for loop
c. a program
d. none of the above
Q. An until loop ensures that the statement within the loop get executed
a. only once
b. atleast once
c. not even once
d. none of the above