Computer Science Study Materials for Competitive Exams

Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Saturday, 26 August 2017

91.       Applications of Linked List are
(A) Simulation, event driven systems
(B) Postfix and prefix manipulations
(C) Dictionary systems, polynomial manipulations
(D) Fixed block storage allocation, garbage collection
Answer: D
92.       AVL trees have LL, LR, RR, RL rotations to balance the tree to maintain the balance factor (LR : Insert node in Right sub tree of Left sub tree of node A, etc). Among rotations the following are single and double rotations
(A) LL, RL and LR, RR
(B) LL, RR and LR, RL
(C) LR, RR and LL, RL
(D) LR, RL and LR, RL
Answer: B
93.       Hashing collision resolution techniques are:
(A) Huffman coding, linear hashing
(B) Bucket addressing, Huffman coding
(C) Chaining, Huffman coding
(D) Chaining, Bucket addressing
Answer: D
94.       After each iteration in bubble sort:
(A) at least one element is at its sorted position.
(B) one less comparison is made in the next iteration.
(C) Both (A) & (B) are true.
(D) Neither (A) or (B) are true.
Answer: A
95.       The running time of the following sorting algorithm depends on whether the partitioning is balanced or unbalanced.
(A) Insertion sort
(B) Selection sort
(C) Quick sort
(D) Merge sort
Answer: C

96.       A procedure that calls itself is called ...............
(A) illegal call
(B) reverse polish
(C) recursive
(D) None of these
Answer: C
97.       Graphs are represented using ............
(A) Adjacency tree
(B) Adjacency linked list
(C) Adjacency graph
(D) Adjacency queue
Answer: B
98.       The average case complexity of Insertion Sort is
(A) O(2n)
(B) O(n3)
(C) O(n2)
(D) O(2n)
Answer: C
99.       Heap is an example of ................
(A) complete binary tree
(B) spanning tree
(C) sparse tree
(D) binary search tree
Answer: A
100.    Infinite recursion leads to ...............
(A) Overflow of run-time stack
(B) Underflow of registers usage
(C) Overflow of I/O cycles
(D) Underflow of run-time stack
Answer: A

Friday, 25 August 2017

81.       The number of edges in a simple, n-vertex, complete graph is
(A) n*(n-2)
(B) n*(n-1)
(C) n*(n-1)/2
(D) n*(n-1)*(n-2)
Answer: C
82.       Match the following:
List - I
i. Bubble Sort  
ii. Shell Sort     
iii. Selection Sort        
List - II
a. Ο(n)
b. Ο(n2)
c. Ο(n log n)
(A) i → a,  ii → b,  iii → c
(B) i → b,  ii → c,  iii → a
(C) i → a,  ii → c,  iii → b
(D) i → b,  ii → a,  iii → c
Answer: B
83.       A double sub-scripted array declared as int a[ 3 ][ 5 ]; has how many elements?
(A) 15
(B) 13
(C) 10
(D) 8
Answer: A
84.       The largest and the second largest number from a set of n distinct numbers can be found in
(A) O(n)
(B) O(2n)
(C) O(n2)
(D) O(log n)
Answer: A
85.       To implement Sparse matrix dynamically, the following data structure is used
(A) Trees
(B) Graphs
(C) Priority Queues
(D) Linked List
Answer: D

86.       The depth dn, of complete binary tree of n nodes, where nodes are labelled from 1 to n with root as node 1 and last leaf node as node n is
Answer: C
87.       Which file open mode would be used to write data only to the end of an existing file?
(A) ios::app
(B) ios::in
(C) ios::out
(D) ios::trunc
Answer: A
88.       The balance factor for an AVL tree is either
(A) 0,1 or -1
(B) -2,-1 or 0
(C) 0,1 or 2
(D) All the above
Answer: A
89.       Tower of Hanoi is a classic example of ..............
(A) divide and conquer
(B) recursive approach
(C) (B) but not (A)
(D) Both (A) & (B)
Answer: D
90.    Which of the following searching techniques do not require the data to be in sorted form?
(A) Binary Search
(B) Interpolation Search
(C) Linear Search
(D) All of the above
Answer: C

Thursday, 24 August 2017

71.       A tree in which, for every node, the difference between the height of its left subtree and right subtree is not more than one is
(A) AVL Tree
(B) Complete Binary Tree
(C) B – Tree
(D) B+ Tree
Answer: A
72.       The data structure needed to convert a recursion to an iterative procedure is ............
(A) Queue
(B) Graph
(C) Stack
(D) Tree
Answer: C
73.       Which of the following uses FIFO method?
(A) Queue
(B) Stack
(C) Hash Table
(D) Binary Search Tree
Answer: A
74.       A binary tree stored using linked representation can be converted to its mirror image by traversing it in ...............
(A) In-order
(B) Pre-order
(C) Post-order
(D) Any order
Answer: B
75.       Minimum number of spanning tree in a connected graph is .............
(A) n
(B) nn - 1
(C) 1
(D) 0
Answer: C

76.       Which of the following algorithm cannot be designed without recursion?
(A) Tower of Hanoi
(B) Fibonacci Series
(C) Tree Traversal
(D) None of the above
Answer: D
77.       The prefix form of an infix expression A+B-C*D is
(A) +AB-*CD
(B) -+A B C * D
(C) -+A B * C D
(D) - + *ABCD
Answer: C
78.       Binary search tree is an example of complete binary tree with special attributes:
(A) BST does not care about complete binary tree properties.
(B) BST takes care of complete binary tree properties.
(C) It depends upon the input.
(D) None of the above.
Answer: A
79.       For a binary search algorithm to work, it is necessary that the array must be ............
(A) sorted
(B) unsorted
(C) in a heap
(D) popped out of stack
Answer: A
80.    A random access file is organized most like a(n):
(A) Array
(B) Object
(C) Class
(D) Pointer
Answer: A

Wednesday, 23 August 2017

61.       To write fixed-length records, use file open mode:
(A) ios::app
(B) ios::ate
(C) ios::trunc
(D) ios::binary
Answer: D
62.       A complete Binary Tree with 15 nodes contains ................. edges
(A) 15
(B) 30
(C) 14
(D) 16
Answer: C
63.       If there is no base criteria in a recursive program, the program will ................
(A) not be executed
(B) execute until all conditions match
(C) execute infinitely
(D) obtain progressive approach
Answer: C
64.       The minimum number of comparisons required to find the largest number from 4 different numbers are
(A) 4
(B) 3
(C) 5
(D) 6
Answer: B
65.       Visiting root node after visiting left and right sub-trees is called .............
(A) In-order Traversal
(B) Pre-order Traversal
(C) Post-order Traversal
(D) None of these
Answer: C

66.       Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among union, intersection, membership, cardinality will be the slowest?
(A) union only
(B) intersection, membership
(C) membership, cardinality
(D) union, intersection
Answer: D
67.       An infix expression can be converted to a postfix expression using a .................
(A) Stack
(B) Queue
(C) Dequeue
(D) None of these
Answer: A
68.       A data structure in which an element is added and removed only from one end, is known as
(A) Queue
(B) Stack
(C) In-built structure
(D) None of the above
Answer: B
69.       A complete binary tree with the property that the value of each node is at least as large as the values of its children is known as ..............
(A) Binary Search Tree
(B) AVL Tree
(C) Heap
(D) Threaded Binary Tree.
Answer: C
70.    A sorting algorithm is stable if
(A) its time complexity is constant irrespective of the nature of input.
(B) preserves the original order of records with equal keys.
(C) its space complexity is constant irrespective of the nature of input.
(D) it sorts any volume of data in a constant time.
Answer: B

Tuesday, 22 August 2017

51.       A graph with n vertices will definitely have a parallel edge or self loop if the total number of edges are
(A) more than n
(B) more than n+1
(C) more than (n+1)/2
(D) more than n(n-1)/2
Answer: D
52.       In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is ............
(A) log2 n
(B) n/2
(C) log2 n-1
(D) n
Answer: D
53.       Index of arrays in C programming language starts from.............
(A) 0
(B) 1
(C) either 0 or 1
(D) undefined
Answer: A
54.       Out of the following, the slowest sorting procedure is
(A) Quick Sort
(B) Heap Sort
(C) Shell Sort
(D) Bubble Sort
Answer: D
55.       The minimum number of edges required to create a cyclic graph of n vertices is .............
(A) n
(B) n - 1
(C) n + 1
(D) 2n
Answer: A

56.       In .............., it is possible to traverse a tree without using stacks either implicitly or explicitly.
(A) Threaded binary trees
(B) AVL Tree
(C) B+ tree
(D) Heap
Answer: C
57.       The order of a B-Tree with 2, 3, 4 or 5 children in every internal node is
(A) 2
(B) 3
(C) 4
(D) 5
Answer: C
58.       Prefix notation is also known as ...............
(A) Reverse Polish Notation
(B) Reverse Notation
(C) Polish Reverse Notation
(D) Polish Notation
Answer: D
59.       The number of nodes that have no successors in a complete binary tree of depth 4 is
(A) 0
(B) 8
(C) 16
(D) 4
Answer: B
60.    One can make an exact replica of a Binary Search Tree by traversing it in ...............
(A) In-order
(B) Pre-order
(C) Post-order
(D) Any order
Answer: B