Sunday, April 15

Basic Computer quiz

Q.1 If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m, the expected number of collisions involving a particular key x is :
(A) less than 1. (B) less than n.
(C) less than m. (D) less than n/2.

Q.2 Let A be an adjacency matrix of a graph G. The th ij entry in the matrix K A , gives
(A) The number of paths of length K from vertex Vi to vertex Vj.
(B) Shortest path of K edges from vertex Vi to vertex Vj.
(C) Length of a Eulerian path from vertex Vi to vertex Vj.
(D) Length of a Hamiltonian cycle from vertex Vi to vertex Vj.

Q.3 The OS of a computer may periodically collect all the free memory space to form contiguous block of free space. This is called
(A) Concatenation (B) Garbage collection
(C) Collision (D) Dynamic Memory Allocation

Q.4 What is the following code segment doing?
void fn( ){
char c;
if (c != ‘\n’) {
fn( );
(A) The string entered is printed as it is.
(B) The string entered is printed in reverse order.
(C) It will go in an infinite loop.
(D) It will print an empty line.

Q.5 You have to sort a list L consisting of a sorted list followed by a few “random” elements. Which of the following sorting methods would be especially suitable for such a task?
(A) Bubble sort (B) Selection sort
(C) Quick sort (D) Insertion sort

Q.6 B Trees are generally
(A) very deep and narrow (B) very wide and shallow
(C) very deep and very wide (D) cannot say

Q.7 A technique for direct search is
(A) Binary Search (B) Linear Search
(C) Tree Search (D) Hashing

Q.8 If a node having two children is deleted from a binary tree, it is replaced by its
(A) Inorder predecessor (B) Inorder successor
(C) Preorder predecessor (D) None of the above

Q.9 The searching technique that takes O (1) time to find a data is
(A) Linear Search (B) Binary Search
(C) Hashing (D) Tree Search

Q.10 A mathematical-model with a collection of operations defined on that model is called
(A) Data Structure (B) Abstract Data Type
(C) Primitive Data Type (D) Algorithm


mohammed abbhas said...

Thank you for the valuble information improve your Aptitude knowledge thank you

mahasiswa teladan said...

hi..Im student from Informatics engineering, this article is very informative, thanks for sharing :)

Anonymous said...