Top 550+ Solved Operating System Architecture MCQ Questions Answer
Q. Which of the following file names can be found in more than one directoy?
a. date
b. passwd
c. bin
d. both b and c
Q. Which one of the following options is not a shell in UNIX system?
a. bourne shell
b. c shell
c. net shell
d. korn shel
Q. Lint should be used
a. before compilation
b. after compilation
c. to analyze a c code
d. none of the above
Q. What is the output of the following program?b =[ -n $b ]echo $? [ -z $b ]echo $?
a. 1 1
b. 2 2
c. 0 0
d. 0 1
Q. What is the output of the following program? [ -n $HOME ]echo $?[ -z $HOME ]echo $?
a. 0 1
b. 1 0
c. 0 0
d. 1 1
Q. What is the output of the following code: s=Unixecho 1.$os 2."$os" 3.'$os' 4.$os
a. 1.unix 2.unix 3.unix 4.unix
b. 1.unix 2.unix 3.$os 4.unix
c. 1.unix 2.unix 3.unix 4.$os
d. 1.unix 2.$os 3.$os 4.$os
Q. which of these is NOT a valid variable in bash
a. (double underscore)
b. _1var (underscore 1 var )
c. _var_ (underscore var underscore)
d. some-var (some hyphen var)
Q. What will be output of following command:$ echo "The process id is" $$$$
a. the process id is $$
b. the process id is$<pid>$<pid>
c. the process id is<pid><pid>
d. the process id is$$$$
Q. What would be the current working directory at the end of the following command sequence? $ pwd/home/user1/proj$ cd src$ cd generic$ cd .$ pwd
a. /home/user1/proj
b. /home/user1/proj/sr c
c. /home/user1
d. /home/user1/proj/src/generic
Q. How do you print the lines between 5 and 10, both inclusive
a. cat filename | head | tail 6
b. cat filename | head | tail -5
c. cat filename | tail+5 | head
d. cat filename | tail-5 | head -10
Q. Create a new file “new.txt” that is a concatenation of “file1.txt” and “file2.txt”
a. cp file.txt file2.txt new.txt
b. cat file1.txt file2.txt> new.txt
c. mv file[12].txt new.txt
d. ls file1.txt file2.txt | new.txt