166. Indicate which of the following is not true about an interpreter

Interpreter is a kind of translator

167. The errors that can be pointed out by the compiler are

Syntax errors

168. C is a) an assembly language

A third generation high level language

169. A graph preapared by a computer

Is its output

Is the piece of information to use

Is a hard copy

170. Which of the following does not represent on i/o device

Alu

171. The communication line between the cpu. Memory and peripherals is called a

Bus

172. Memories which can be read only are called…………..memories

Rom(read only memory)

173. Example of non-numerical data is

Employee address

174. One thousand bytes represent a

Kilobyte

175. The language that the computer can understand and execute is called

Machine language

176. A step by step procedure used to solve a problem is called

Algorithm

177. Which of the following holds the rom. Cpu. Ram and expansion cards

Mother board

178. The errors that can be pointed out by the compiler are

Syntax errors

179. A computer cannot boot’ if it does not have the

Operating system

180. Wan hardware includes

Multiplexors and routers

181. A computer can be defined as an electronic device that can be (choose the most precise definition):

Accept and process data using a set of stored instructions

182. The central processing unit:

Controls all input, output and processing.

183. Computer follows a simple principle called gigo which means

Garbage in garbage out

184. The term baud’ is a measure of the:

Speed at which data travels over the communication line

185. A bootstrap is:

A small initialisation program to start up a computer

186. Which of the following is not hardware:

Assembler

187. Pick out the wrong definition :

Access time – time needed to access the output

188. Which of these best describes an array?

Container of objects of similar types

189. How do you initialize an array in c?

Int arr[3] = {1,2,3};

190. When does the arrayindexoutofboundsexception occur?

Run-time

191. Which of the following concepts make extensive use of arrays?

Spatial locality

192. What are the advantages of arrays?

Easier to store elements of same data type

193. What are the disadvantages of arrays?

There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size

194. Assuming int is of 4bytes, what is the size of int arr[15];?

60

195. In general, the index of the first element in an array is __________

0

196. Elements in an array are accessed _____________

Randomly

197. Process of inserting an element in stack is called ____________

Push

198. Process of removing an element from stack is called __________

Pop

199. In a stack, if a user tries to remove an element from an empty stack it is called

Underflow

200. Pushing an element into stack already having five elements and stack size of 5, then stack becomes ___________

Overflow

201. Entries in a stack are “ordered”. What is the meaning of this statement?

There is a sequential entry that is one by one

202. Which of the following is not the application of stack?

Data transfer between two asynchronous process

203. What is the value of the postfix expression 6 3 2 4 + – *?

-18

204. The data structure required to check whether an expression contains a balanced parenthesis is?

Stack

205. What data structure would you most likely see in non recursive implementation of a recursive algorithm?

Stack

206. The process of accessing data stored in a serial access memory is similar to manipulating data on a ________

Stack

207. Which data structure is needed to convert infix notation to postfix notation?

Stack

208. Which data structure is used for implementing recursion?

Stack

209. Which of the following statement(s) about stack data structure is/are not correct?

Stack is the fifo data structure

210. Which of the following is not an inherent application of stack?

Job scheduling

211. The type of expression in which operator succeeds its operands is?

Postfix expression

212. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as _____________

Queue

213. The data structure required for breadth first traversal on a graph is?

Queue

214. A queue follows __________

Fifo (first in first out) principle

215. A data structure in which elements can be inserted or deleted at/from both ends but not in the middle is?

Dequeue

216. Circular queue is also known as ________

Ring buffer

217. Queues serve major role in ______________

Simulation of limited resource allocation

218. Which of the following is not the type of queue?

Single ended queue

219. What kind of linked list is best to answer questions like “what is the item at position n?”

Array implementation of linked list

220. Linked lists are not suitable for the implementation of ___________

Binary search

221. Linked list is considered as an example of ___________ type of memory allocation.

Dynamic

222. In linked list implementation, a node carries information regarding ___________

Data and link

223. Linked list data structure offers considerable saving in _____________

Space utilization and computational time

224. Which of the following points is/are not true about linked list data structure when it is compared with an array?

Access of elements in linked list takes less time than compared to arrays

225. Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?

Merge sort

226. Which of the following is not a disadvantage to the usage of array?

Accessing elements at specified positions

227. What is the time complexity of inserting at the end in dynamic arrays?

Either o(1) or o(n)

228. What is the time complexity to count the number of elements in the linked list?

O(n)

229. What is the space complexity for deleting a linked list?

O(1)

230. Which of these is not an application of a linked list?

Random access of elements

231. Which of the following is false about a doubly linked list?

Implementing a doubly linked list is easier than singly linked list

232. What is a memory efficient double linked list?

Each node has only one pointer to traverse the list back and forth

233. How do you calculate the pointer difference in a memory efficient double linked list?

Pointer to previous node xor pointer to next node

234. What is the worst case time complexity of inserting a node in a doubly linked list?

O(n)

235. What differentiates a circular linked list from a normal linked list?

You may or may not have the ‘next’ pointer point to null in a circular linked list

236. What is the time complexity of searching for an element in a circular linked list?

O(n)

237. Which of the following application makes use of a circular linked list?

Allocating cpu to resources

238. Which of the following is false about a circular linked list?

Time complexity of inserting a new node at the head of the list is o(1)

239. Consider a small circular linked list. How to detect the presence of cycles in this list effectively?

Have fast and slow pointers with the fast pointer advancing two nodes at a time and slow pointer advancing by one node at a time

240. Which of the following real world scenarios would you associate with a stack data structure?

Piling up of chairs one above the other

241. What does ‘stack underflow’ refer to?

Removing items from an empty stack

242. What is the time complexity of pop() operation when the stack is implemented using an array?

O(1)

243. Which of the following array position will be occupied by a new element being pushed for a stack of size n elements(capacity of stack > n)?

S[n]

244. Array implementation of stack is not dynamic, which of the following statements supports this argument?

Space allocation for array is fixed and cannot be changed during run-time

245. What does ‘stack overflow’ refer to?

Adding items to a full stack

246. Which of the following data structures can be used for parentheses matching?

Stack

247. Minimum number of queues to implement stack is ___________

1

248. Which of the following properties is associated with a queue?

First in first out

249. In a circular queue, how do you increment the rear end of the queue?

(rear+1) % capacity

250. What is the term for inserting into a full queue known as?

Overflow

251. What is the need for a circular queue?

Effective usage of memory

252. In linked list implementation of queue, if only front pointer is maintained, which of the following operation take worst case linear time?

Both insertion and to empty a queue

253. In linked list implementation of a queue, where does a new element be inserted?

At the tail of the link list

254. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a nonempty queue?

Only rear pointer

255. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into empty queue?

Both front and rear pointer

256. In case of insertion into a linked queue, a node borrowed from the __________ list is inserted in the queue.

Avail

257. In linked list implementation of a queue, from where is the item deleted?

At the head of link list

258. In linked list implementation of a queue, the important condition for a queue to be empty is?

Front is null

259. The essential condition which is checked before insertion in a linked queue is?

Overflow

260. The essential condition which is checked before deletion in a linked queue is?

Underflow

261. Which of the following is true about linked list implementation of queue?

In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end

262. With what data structure can a priority queue be implemented?

Heap

263. Which of the following is not an application of priority queue?

Undo operation in text editors

264. What is not a disadvantage of priority scheduling in operating systems?

Interrupt handling

265. Which of the following is not an advantage of a priority queue?

Easy to delete elements in any case

266. What is a dequeue?

A queue with insert/delete defined for both front and rear ends of the queue

267. To implement a stack using queue(with only enqueue and dequeue operations), how many queues will you need?

2

268. Express -15 as a 6-bit signed binary number.

101111

269. Which is the predefined method available in java to convert decimal to binary numbers?

Tobinarystring(int)

270. How many stacks are required for applying evaluation of infix expression algorithm?

Two

271. How many passes does the evaluation of infix expression algorithm makes through the input?

One

272. Identify the infix expression from the list of options given below.

A/b+(c-d)

273. Which of the following statement is incorrect with respect to evaluation of infix expression algorithm?

If the precedence of operator is higher, pop two operands and evaluate

274. Evaluate the following statement using infix evaluation algorithm and choose the correct answer. 1+2*3-2

5

275. Evaluation of infix expression is done based on precedence of operators.

True

276. Of the following choices, which operator has the lowest precedence?

#

277. The system throws an error if parentheses are encountered in an infix expression evaluation algorithm.

False

278. Evaluate the following and choose the correct answer.

A/b+c*d where a=4, b=2, c=2, d=1.

4

279. Evaluate the following statement using infix evaluation algorithm and choose the correct answer. 4*2+3-5/5

10

280. Using the evaluation of infix expression, evaluate a^b+c and choose the correct answer. (a=2, b=2, c=2)

6

281. Evaluate the following infix expression using algorithm and choose the correct answer. A+b*c-d/e^f where a=1, b=2, c=3, d=4, e=2, f=2.

6

282. How many stacks are required for evaluation of prefix expression?

Two

283. While evaluating a prefix expression, the string is read from?

Right to left

284. The associativity of an exponentiation operator ^ is right side.

True

285. How many types of input characters are accepted by this algorithm?

Three

286. What determines the order of evaluation of a prefix expression?

Precedence and associativity

287. An error is thrown if the character ‘\n’ is pushed in to the character stack.

False

288. Using the evaluation of prefix algorithm, evaluate +-9 2 7.

14

289. If -*+abcd = 11, find a, b, c, d using evaluation of prefix algorithm.

A=1, b=2, c=5, d=4

290. The optimal data structure used to solve tower of hanoi is _________

Stack

291. Which among the following is not a palindrome?

Maadam

292. Which data structure can be used to test a palindrome?

Stack

293. What is the number of moves required to solve tower of hanoi problem for k disks?

2k – 1

294. Reversing a word using stack can be used to find if the given word is a palindrome or not.

True

295. Which is the most appropriate data structure for reversing a word?

Stack

296. Operations required for reversing a word or a string using stack are push() and pop().

True

297. What will be the word obtained if the word “abbcabb” is reversed using a stack?

Bbacbba

298. How many stacks are required for reversing a word algorithm?

One

299. What is a bit array?

Data structure that compactly stores bits

300. Which of the following bitwise operations will you use to set a particular bit to 1?

Or

301. Which of the following bitwise operations will you use to set a particular bit to 0?

And

302. Which of the following bitwise operations will you use to toggle a particular bit?

Xor

303. Which of the following is not an advantage of bit array?

Accessing individual elements is easy

304. Which of the following is not a disadvantage of bit array?

Storing and manipulating in the register set for long periods of time

305. Which of the following is/are not applications of bit arrays?

Implementation of vectors and matrices

306. Which of the following bitwise operator will you use to invert all the bits in a bit array?

Not

307. Run-length encoding is used to compress data in bit arrays.

True

308. What does hamming weight/population count mean in bit arrays?

Finding the number of 1 bit in a bit array

309. Bit fields and bit arrays are same.

False

310. Which one of the following operations returns the first occurrence of bit 1 in bit arrays?

Find first one

311. What is a dynamic array?

A variable size data structure

312. What is meant by physical size in a dynamic array?

The size of the underlying array at the back-end

313. The number of items used by the dynamic array contents is its __________

Logical size

314. Array is divided into two parts in ____________

Bounded-size dynamic array

315. Which of the following is a disadvantage of dynamic arrays?

Memory leak

316. What is the time complexity for inserting/deleting at the beginning of the array?

O(n)

317. Dynamic arrays overcome the limit of static arrays.

True

318. The size of the dynamic array is deallocated if the array size is less than _________% of the backend physical size.

30

319. Both dynamic array and dynamically memory allocated array are same.

False

320. In which of the following cases dynamic arrays are not preferred?

If the array holds less number of elements

321. In special case, the time complexity of inserting/deleting elements at the end of dynamic array is __________

O (n)

322. Which of the following arrays are used in the implementation of list data type in python?

Parallel arrays

323. What are parallel arrays?

Arrays of the same number of elements

324. Which of the following is a disadvantage of parallel array over the traditional arrays?

Insertion and deletion becomes tedious

325. Which of the following is an advantage of parallel arrays?

Increased locality of reference

326. What is a sorted array?

Arrays sorted in numerical order

Arrays sorted in alphabetical order

Elements of the array are placed at equally spaced addresses in the memory

327. To search for an element in a sorted array, which searching technique can be used?

Binary search

328. Which of the following is not an application of sorted array?

Hash tables

329. What is a sparse array?

An array in which most of the elements have the same value

330. When do you use a sparse array?

When the array has more occurrence of zero elements

331. What is the difference between a normal(naive) array and a sparse array?

Sparse array is memory efficient

332. What is sparsity of a matrix?

The fraction of zero elements over the total number of elements

333. Which of the following is the disadvantage of sparse matrices over normal matrices?

Algorithm complexity

334. What is the order of a matrix?

Number of rows x number of columns

335. Which of the following property does not hold for matrix multiplication?

Commutative

336. Which of the following don’t use matrices?

Sorting numbers

337. Which of the following is an advantage of matrices?

Graph plotting

338. Matrix a when multiplied with matrix c gives the identity matrix i, what is c?

Inverse of a

339. Which matrix has most of the elements (not all) as zero?

Sparse matrix

340. Who coined the term sparse matrix?

Harry markowitz

341. Which of the following is not the method to represent sparse matrix?

Heap

342. Is sparse matrix also known as dense matrix?

False

343. Which one of the following is a special sparse matrix?

Band matrix

344. In what way the symmetry sparse matrix can be stored efficiently?

Binary tree