Computer Science - UNIX
Quiz-summary
0 of 200 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
Information
This is MCQs of Computer Science Subject.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 200 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- Answered
- Review
-
Question 1 of 200
1. Question
UNIX was developed by
Correct
Incorrect
-
Question 2 of 200
2. Question
Chocolate Chip is
Correct
Incorrect
-
Question 3 of 200
3. Question
Which of the following features of UNIX may be used for inter process communication?
Correct
Incorrect
-
Question 4 of 200
4. Question
Pick the incorrect statements
Correct
Incorrect
-
Question 5 of 200
5. Question
UNIX is
Correct
Incorrect
-
Question 6 of 200
6. Question
Which of the following statements best explains a process?
Correct
Incorrect
-
Question 7 of 200
7. Question
In a system, if 5 people are currently using the vi editor, then the number of corresponding processes will be
Correct
Incorrect
-
Question 8 of 200
8. Question
Kernel is not involved
Correct
Incorrect
-
Question 9 of 200
9. Question
The command
echo welcome > /dev/ttyCorrect
Incorrect
-
Question 10 of 200
10. Question
/dev/null
Correct
Incorrect
-
Question 11 of 200
11. Question
The advantage of binary files over text files is that
Correct
Incorrect
-
Question 12 of 200
12. Question
The permission bits of a file noname, can be set to _rws_ _x_ _x by the command
Correct
Incorrect
-
Question 13 of 200
13. Question
/bin/passwd has the user execution permission set to ‘s’ because
Correct
Incorrect
-
Question 14 of 200
14. Question
If one doesn’t want anyone else to read or write to a file named datfile, except through a program in file filex, then he may use
Correct
Incorrect
-
Question 15 of 200
15. Question
Writing a C program that accepts input from keyboard, rather than from a file is advantage geous because
Correct
Incorrect
-
Question 16 of 200
16. Question
Consider the following command that invokes the executable file a.out, with the following command line arguments a.out God loves you
argv[1][2] corresponds to the characterCorrect
Incorrect
-
Question 17 of 200
17. Question
In the previous question after the operation argv++, the value of argv[1][2] will be
Correct
Incorrect
-
Question 18 of 200
18. Question
Which of the following string functions can be used to find the last occurrence of a given character in a given string?
Correct
Incorrect
-
Question 19 of 200
19. Question
Choose the correct statements.
Correct
Incorrect
-
Question 20 of 200
20. Question
Which of the following fields in the structure stat, has information about the permission setting of a file?
Correct
Incorrect
-
Question 21 of 200
21. Question
To simulate the command “system”, which of the system calls – fork, wait, and excel is/are to be used ?
Correct
Incorrect
-
Question 22 of 200
22. Question
Consider the program
main()
{
printf (“He arose a victor from\n”) ;
system (“date”) ;
printf(“the dark domain”) ;
}
if a.out is the executable code corresponding to the above source code, then the command a.out > outfCorrect
Incorrect
-
Question 23 of 200
23. Question
The default permission bits of a file when it is created for the first time, is controlled by
Correct
Incorrect
-
Question 24 of 200
24. Question
Let x.c be a C source code. The command cc ‘x.c > y
Correct
Incorrect
-
Question 25 of 200
25. Question
Which of the following sections in the manual covers system calls?
Correct
Incorrect
-
Question 26 of 200
26. Question
Which of the following are not system calls ?
Correct
Incorrect
-
Question 27 of 200
27. Question
Choose the correct statements.
Correct
Incorrect
-
Question 28 of 200
28. Question
Which of the following remarks about system calls, library functions and UNIX commands are true?
Correct
Incorrect
-
Question 29 of 200
29. Question
The 2 in the manual entry access (2)
Correct
Incorrect
-
Question 30 of 200
30. Question
If path is set to . : /usr/x:/usr/bin, then
Correct
Incorrect
-
Question 31 of 200
31. Question
A file x is created with the following contents
echo today is :
date
If you type x, thenCorrect
Incorrect
-
Question 32 of 200
32. Question
Shell script is preferable to other forms of programming because it
Correct
Incorrect
-
Question 33 of 200
33. Question
Choose the incorrect statements.
Correct
Incorrect
-
Question 34 of 200
34. Question
Files that store data in the same format as used in program are called
Correct
Incorrect
-
Question 35 of 200
35. Question
To allow only one user to work with a particular file at a particular time, one has to use
Correct
Incorrect
-
Question 36 of 200
36. Question
Which of the following remarks about realloc are ture ?
Correct
Incorrect
-
Question 37 of 200
37. Question
The differences between malloc() and calloc() are :
Correct
Incorrect
-
Question 38 of 200
38. Question
The file that stores an integer as a sequence of characters is a
Correct
Incorrect
-
Question 39 of 200
39. Question
If cat x, prints garbage, then x is probably a
Correct
Incorrect
-
Question 40 of 200
40. Question
Which of the following file names can be found in more than one directory?
Correct
Incorrect
-
Question 41 of 200
41. Question
/bin
Correct
Incorrect
-
Question 42 of 200
42. Question
The main reasons for the success of pipes are
Correct
Incorrect
-
Question 43 of 200
43. Question
Which of the following are not filter programs?
Correct
Incorrect
-
Question 44 of 200
44. Question
Redirection in pipes can be achieved by using
Correct
Incorrect
-
Question 45 of 200
45. Question
Choose the correct statements.
Correct
Incorrect
-
Question 46 of 200
46. Question
The command who | sort – file1 – file2
Correct
Incorrect
-
Question 47 of 200
47. Question
If the command cat x, is executed after successfully executing the command time sort filename > x, then
Correct
Incorrect
-
Question 48 of 200
48. Question
Which of the following information is not present in an i-node?
Correct
Incorrect
-
Question 49 of 200
49. Question
The system identifies a file by its
Correct
Incorrect
-
Question 50 of 200
50. Question
The system identifies the end of a file by the
Correct
Incorrect
-
Question 51 of 200
51. Question
The command line argument a.out x ‘a b’ “c d”
Correct
Incorrect
-
Question 52 of 200
52. Question
Which of the following metacharacters will be recognized by the shell, even if it comes within double quotes?
Correct
Incorrect
-
Question 53 of 200
53. Question
lint should be used
Correct
Incorrect
-
Question 54 of 200
54. Question
Environment variables can be accessed by
Correct
Incorrect
-
Question 55 of 200
55. Question
Which of the following are character special file?
Correct
Incorrect
-
Question 56 of 200
56. Question
If one exports a variable
Correct
Incorrect
-
Question 57 of 200
57. Question
Profiels are
Correct
Incorrect
-
Question 58 of 200
58. Question
The shell command
Correct
Incorrect
-
Question 59 of 200
59. Question
Which of the following tools can be used to keep track of evolving versions of a file?
Correct
Incorrect
-
Question 60 of 200
60. Question
The . (dot) shell command
Correct
Incorrect
-
Question 61 of 200
61. Question
m4
Correct
Incorrect
-
Question 62 of 200
62. Question
The first thing that is searched when a command references a file is its
Correct
Incorrect
-
Question 63 of 200
63. Question
cc command sequentially invokes
Correct
Incorrect
-
Question 64 of 200
64. Question
Among the directory entries, i-node and the file contents, which will be changed when a file is updated?
Correct
Incorrect
-
Question 65 of 200
65. Question
The cc command
Correct
Incorrect
-
Question 66 of 200
66. Question
The mv command changes
Correct
Incorrect
-
Question 67 of 200
67. Question
If 7 terminals are currently logged on, then the command
date ; who | wc -1, displaysCorrect
Incorrect
-
Question 68 of 200
68. Question
Choose the correct answers if the command Is -1 /dev/mt 0 displays
brw_rw_ _ _ _ 1 root 3, 0 jan 18 11:05 mt0Correct
Incorrect
-
Question 69 of 200
69. Question
Choose the correct statements.
Correct
Incorrect
-
Question 70 of 200
70. Question
cat /dev/tty
Correct
Incorrect
-
Question 71 of 200
71. Question
The header files used in C programs are usually found in
Correct
Incorrect
-
Question 72 of 200
72. Question
The command pwd displays /x/y. After executing the command chmod u-x, which of the following commands will not work?
Correct
Incorrect
-
Question 73 of 200
73. Question
A C program should be compiled with -g option (like cc -g x. c) to use
Correct
Incorrect
-
Question 74 of 200
74. Question
The difference between a pipe and a regular file is that
Correct
Incorrect
-
Question 75 of 200
75. Question
Choose the correct statements.
Correct
Incorrect
-
Question 76 of 200
76. Question
Context switch changes the process mode from
Correct
Incorrect
-
Question 77 of 200
77. Question
File x.c has 5 lines of code. The command
date | tee abc | sort – x,c | wc -1, displaysCorrect
Incorrect
-
Question 78 of 200
78. Question
Which of the following comments about the signals system call are true?
Correct
Incorrect
-
Question 79 of 200
79. Question
lint can analyze the named source code for
Correct
Incorrect
-
Question 80 of 200
80. Question
Which of the following characteristics of the original process are preserved when, the exec system call is executed?
Correct
Incorrect
-
Question 81 of 200
81. Question
Which of the following remarks about lex are true?
Correct
Incorrect
-
Question 82 of 200
82. Question
Which of the following programs are not interactive?
Correct
Incorrect
-
Question 83 of 200
83. Question
lex can be used for
Correct
Incorrect
-
Question 84 of 200
84. Question
The number of errors in the following shell script
echo How are you ?
read $answer
isCorrect
Incorrect
-
Question 85 of 200
85. Question
The read in the previous question is a
Correct
Incorrect
-
Question 86 of 200
86. Question
If lex.1 is a lex code then
Correct
Incorrect
-
Question 87 of 200
87. Question
Choose the correct statements.
Correct
Incorrect
-
Question 88 of 200
88. Question
A file hai has the following shell script in it
echo Oh! what a wonderful day
echo Day I will never forget 1>&2
echo Day I will never ever get
The command sh hai > mnCorrect
Incorrect
-
Question 89 of 200
89. Question
No shell script can take input from
Correct
Incorrect
-
Question 90 of 200
90. Question
The command cc x.c && a.out
Correct
Incorrect
-
Question 91 of 200
91. Question
Which of the following shell script’s looping features does not recognize the break command?
Correct
Incorrect
-
Question 92 of 200
92. Question
Shell script
Correct
Incorrect
-
Question 93 of 200
93. Question
The desirable features of a new shell script you write is that
Correct
Incorrect
-
Question 94 of 200
94. Question
Which of the following shell commands displays the contents of each of the command line arguments, one by one?
Correct
Incorrect
-
Question 95 of 200
95. Question
The disadvantage of a pipe is that
Correct
Incorrect
-
Question 96 of 200
96. Question
The state of signals are
Correct
Incorrect
-
Question 97 of 200
97. Question
A fork system call will fail, if
Correct
Incorrect
-
Question 98 of 200
98. Question
Which of the following options for the shell command test should be followed by the file descriptor?
Correct
Incorrect
-
Question 99 of 200
99. Question
Which of the following displays the exit status of the last executed command?
Correct
Incorrect
-
Question 100 of 200
100. Question
Which of the following initiates the sequence of events that ultimately allows a user to login?
Correct
Incorrect
-
Question 101 of 200
101. Question
Which of the following file names cannot be displayed if 1s * is run?
Correct
Incorrect
-
Question 102 of 200
102. Question
getc (stdin)
Correct
Incorrect
-
Question 103 of 200
103. Question
Which of the following is not the work of a C-preprocessor?
Correct
Incorrect
-
Question 104 of 200
104. Question
Which of the following is used to write disk block images from memory to disk?
Correct
Incorrect
-
Question 105 of 200
105. Question
Choose the correct statement.
Correct
Incorrect
-
Question 106 of 200
106. Question
The following program
main ()
{
close (1) ;
print ( “HOw R U?” ) ;
}Correct
Incorrect
-
Question 107 of 200
107. Question
The PID of the kernel process is
Correct
Incorrect
-
Question 108 of 200
108. Question
Choose the correct remarks.
Correct
Incorrect
-
Question 109 of 200
109. Question
Which of the following is an index to the array of open files maintained by the kernel for a user?
Correct
Incorrect
-
Question 110 of 200
110. Question
In which of the following directories does init reside?
Correct
Incorrect
-
Question 111 of 200
111. Question
The command cat > x
Correct
Incorrect
-
Question 112 of 200
112. Question
Which of the following are defined in stdio.h?
Correct
Incorrect
-
Question 113 of 200
113. Question
The login prompt can be changed by changing the contents of the file
Correct
Incorrect
-
Question 114 of 200
114. Question
When the read system call encounters EOF, it returns
Correct
Incorrect
-
Question 115 of 200
115. Question
Which of the following library functions do not return a pointer to the structure FILE?
Correct
Incorrect
-
Question 116 of 200
116. Question
Which of the following processes are involved in the process of allowing a person to login?
Correct
Incorrect
-
Question 117 of 200
117. Question
Which of the following system calls reads 8 bits from the standard input? (assume buff is a pointer to the buffer area)
Correct
Incorrect
-
Question 118 of 200
118. Question
Which of the following are implemented as macros (rather than functions)?
Correct
Incorrect
-
Question 119 of 200
119. Question
Choose the correct statements.
Correct
Incorrect
-
Question 120 of 200
120. Question
When the user responds to login prompt
Correct
Incorrect
-
Question 121 of 200
121. Question
The shell command cat x y ? x
Correct
Incorrect
-
Question 122 of 200
122. Question
Which of the following return file descriptor?
Correct
Incorrect
-
Question 123 of 200
123. Question
To simulate the who command, one has to access the file
Correct
Incorrect
-
Question 124 of 200
124. Question
A file system in UNIX has the four sections – boot block, super block, I-list and data block that are arranged in the order.
Correct
Incorrect
-
Question 125 of 200
125. Question
stderr, stdout, stdin have the file descriptors
Correct
Incorrect
-
Question 126 of 200
126. Question
Which of the following functions can be used to randomly access a file?
Correct
Incorrect
-
Question 127 of 200
127. Question
A manual entry of the form xyz (3S)
Correct
Incorrect
-
Question 128 of 200
128. Question
The reference time adopted by UNIX is
Correct
Incorrect
-
Question 129 of 200
129. Question
perror () can be simulated by using
Correct
Incorrect
-
Question 130 of 200
130. Question
A process that uses CPU, cannot continue to use it if
Correct
Incorrect
-
Question 131 of 200
131. Question
The command cd . / . . / .
Correct
Incorrect
-
Question 132 of 200
132. Question
The UNIX tool awk
Correct
Incorrect
-
Question 133 of 200
133. Question
Which of the following strings will be matched by awk, if / (x +) * y ! $ / is the specifed pattern to be searched for ?
Correct
Incorrect
-
Question 134 of 200
134. Question
When awk encounters strings in arithmetic expression,
Correct
Incorrect
-
Question 135 of 200
135. Question
Which of the following comments about awk are ture?
Correct
Incorrect
-
Question 136 of 200
136. Question
Which of the following UNIX tools, receives input only from the standard input?
Correct
Incorrect
-
Question 137 of 200
137. Question
If x,c is a file, then ed x,c creates a copy of x.c in
Correct
Incorrect
-
Question 138 of 200
138. Question
The number of 3’s in the output of the following C program
main ()
{
printf( “1” ) ; fork () ;
printf ( “2” ) fork () ;
fork () ; printf ( “3” ) ;
}
isCorrect
Incorrect
-
Question 139 of 200
139. Question
Which of the following processes has the PID 1?
Correct
Incorrect
-
Question 140 of 200
140. Question
Which of the following remarks about fgrep are true?
Correct
Incorrect
-
Question 141 of 200
141. Question
Which of the following results in an error?
Correct
Incorrect
-
Question 142 of 200
142. Question
Which of the following is not a command delimiter?
Correct
Incorrect
-
Question 143 of 200
143. Question
A file abc has the following shell script in it.
cat $q > $1.$$
the command sh abc filelCorrect
Incorrect
-
Question 144 of 200
144. Question
*?* will be the output of
Correct
Incorrect
-
Question 145 of 200
145. Question
Which of the following shell variables can be used to customize the editors (like ex, vi)?
Correct
Incorrect
-
Question 146 of 200
146. Question
echo $x will output
Correct
Incorrect
-
Question 147 of 200
147. Question
If the command exit it run twice followed by running the command echo $x, the output will be
Correct
Incorrect
-
Question 148 of 200
148. Question
An orphan process
Correct
Incorrect
-
Question 149 of 200
149. Question
Which of the following calls never returns an error?
Correct
Incorrect
-
Question 150 of 200
150. Question
The following C program
main ()
{
fork() ; fork () ; print f (“yes”) ;
}
prints yesCorrect
Incorrect
-
Question 151 of 200
151. Question
When a process makes a system call, its mode changes from
Correct
Incorrect
-
Question 152 of 200
152. Question
Choose the correct statements.
Correct
Incorrect
-
Question 153 of 200
153. Question
The command 1s > xy
Correct
Incorrect
-
Question 154 of 200
154. Question
Shell functions
Correct
Incorrect
-
Question 155 of 200
155. Question
The cc command makes a total of
Correct
Incorrect
-
Question 156 of 200
156. Question
Which of the following is not invoked when the cc command executes?
Correct
Incorrect
-
Question 157 of 200
157. Question
creat will fail, if
Correct
Incorrect
-
Question 158 of 200
158. Question
Which of the following arguments to the open system call, will be discarded, if the named file already exists?
Correct
Incorrect
-
Question 159 of 200
159. Question
UNder which of the following circumstances rm /y/x, cannot remove x?
Correct
Incorrect
-
Question 160 of 200
160. Question
File pointer
Correct
Incorrect
-
Question 161 of 200
161. Question
The C compiler can be modified to compile programs coded in other high level languages just by changing
Correct
Incorrect
-
Question 162 of 200
162. Question
When a file is aliased
Correct
Incorrect
-
Question 163 of 200
163. Question
setting the execute bit on has no meaning, if the file is a
Correct
Incorrect
-
Question 164 of 200
164. Question
Which of the following sections of an executable binary file has all uninitialised data items?
Correct
Incorrect
-
Question 165 of 200