Top 80+ Solved Unix Operating System MCQ Questions Answer

From 46 to 60 of 82

Q. Which of the following assignments is illegal

a. a=’ls’

b. b=’ls –l’

c. c=’1972’

d. d=’who | grepaal’

  • c. c=’1972’

Q. Which of the following assignment is illegal

a. a=’cat file’

b. a=100 b=50

c. age=25

d. all the above

  • c. age=25

Q. A null variable a can be created using

a. a=

b. a=’’

c. a=””

d. all the above

  • 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

  • a. total number of arguments supplied to the shell script

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

  • a. an interpreter

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

  • 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

  • a. the positional parameters would be shifted by the value of the variable v

Q. Which of the following shows the correct hierarchy of arithmetic operations in shell

a. (),**,* or /, + or –

b. (), **, *,/,+,-

c. (),**,/,*,+,-

d. (),/,% or *,- or +

  • d. (),/,% or *,- or +

Q. Hierarchy decides which operator

a. is most important

b. is used first

c. is fastest

d. operates on largest numbers

  • b. is used first

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

  • b. a for loop

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

  • d. none of the above
Subscribe Now

Get All Updates & News