+ All Categories
Home > Documents > MIT102-B1476-MQP

MIT102-B1476-MQP

Date post: 11-Feb-2016
Category:
Upload: johanikathua
View: 215 times
Download: 0 times
Share this document with a friend
Description:
Sikkim Manipal University
Popular Tags:
22
Model Question Paper Subject Code: MIT 102 Subject Name Data and File Structure Credits: 4 Marks: 140 Part A (One mark questions) 1. Data structures can be divided in to_________ types A) One B) Two B) Three D) Four 2. In linked list the elements are connected by the link field which contains the address of the ___________ A) Next Node B) Previous node C) Last node D) None of these 3. ________is a data structure in which insertions and deletions are restricted at one end, called the top. A) Linked Lists B) Trees C) Graph D) Stack
Transcript
Page 1: MIT102-B1476-MQP

Model Question Paper

Subject Code: MIT 102

Subject Name – Data and File Structure

Credits: 4 Marks: 140

Part A (One mark questions)

1. Data structures can be divided in to_________ types

A) One B) Two

B) Three

D) Four

2. In linked list the elements are connected by the link field which contains the address of the

___________

A) Next Node

B) Previous node

C) Last node

D) None of these 3. ________is a data structure in which insertions and deletions are restricted at one end, called the top.

A) Linked Lists

B) Trees

C) Graph

D) Stack

Page 2: MIT102-B1476-MQP

4. The process to find the location of the record with the given key value is called _________

A) Traversing

B) Sorting

C) Searching

D) Deletion

5. The floor and ceiling function are also called as _____or ______integer function.

A) Greater, least

B) Least, greater

C) Small, greater

D) Big, small

6. A_________ of a set of n elements is an arrangement of the elements in a given order.

A) Combination

B) Permutation

C) Group

D) None of these

7. An algorithm is a ________ procedure in normal English language for solving a particular

problem.

A) Random

B) Complicated

C) Both A and B

D) Step by step

8. The number of cases involved in complexity theory are ________

A) Three

B) Two

C) Four

D) Five

Page 3: MIT102-B1476-MQP

9. Traversing a linked list means processing each node of list exactly ______.

A) Twice

B) Thrice

C) Once

D) None of these

10. The operating system of a computer may periodically collect all the deleted space onto the

free storage list and this technique is called_________.

A) Memory management

B) Garbage Collection

C) Memory allocation

D) Memory Deallocation

11. In _________, null pointer in the last node is replaced with address of the first node so that

it forms a circle.

A) Doubly linked list

B) Linear linked list

C) Circular doubly linked list

D) Circular linked list

12. ___________is the process of removing a node from the linked list.

A) Traversal

B) Searching

C) Insertion

D) Deletion

13. The two basic operations in stack are___________.

A) Insertion and deletion

B) Searching and sorting

C) Push and pop

D) None of these

Page 4: MIT102-B1476-MQP

14. Before executing push operation one must check for the __________ condition. A) Underflow

B) Overflow

C) Full

D) Empty

15. In linked list representation of stack, push operation is performed by inserting a node into the

_____ of the linked list.

A) End

B) Middle

C) Front

D) None of these

16. Before executing the pop operation we must check for the _________condition.

A) Underflow

B) Overflow

C) Full

D) Empty

17. A _________is a non-linear data structure consists of root node.

A) Stack

B) Queue

C) Tree

D) Graph

18._________ connects nodes with one another in a tree data structure.

A) Root

B) Degree

C) Siblings

D) Edge

19. A ____________is a special case of tree where no node of a tree can have a degree

more than two.

A) Forest

B) Leaves

C) Binary Tree

D) Root

Page 5: MIT102-B1476-MQP

20. In _________traversal, traversal starts with the left most subtree.

A) Inorder

B) Preorder

C) Postorder

D) Both A and B

21. General tree can be converted into an equivalent binary tree, but this process makes the

tree imbalance.

A) True

B) False

22. Incomplete tree is very efficient in memory management.

A) True

B) False

23. Binary search tree (BST) is also known as __________

A) Ordered binary tree

B) Unordered Binary tree

C) Sequential Binary tree

D) Unbalanced Binary tree

24. If we are trying to delete a _________node in a binary search tree just delete that node and

rest of the tree is left as it is.

A) Root node

B) Leaf node

C) Node with two children

D) Node with one child

25. Which tree has balancing factor?

A) AVL tree

B) Binary tree

C) Complete binary tree

D) Strictly Binary tree

Page 6: MIT102-B1476-MQP

26. If a balance factor of a node is _____ then the heights of its left and right subtrees are equal.

A) 1

B) -1

C) 0

D) 2

27. If the balance factor of any node in the tree is affected, then we apply the technique called

__________.

A) Addition

B) Rotation

C) Tree balance

D) Redirection

28. R0 rotation is used during deletion of node from AVL tree.

A) True

B) False

29. A graph data structure consists mainly of __________.

A) Nodes

B) Edges

C) Root

D) Both A and B

30. In graph, directed link between two nodes is known as _______.

A) Path

B) Arc

C) Edge

D) Route

31. Full form of PERT is

A) Program Evaluation and Review Technique

B) Process Evaluation and Review Technique

C) Program Effective and Review Technique

D) Process Effective and Review Technique

Page 7: MIT102-B1476-MQP

32. The vertex order produced by a topological sort is unique.

A) True

B) False

33. Free memory in the free storage area generally holds the memory as _______block.

A) Contiguous

B) Non-contiguous

C) Continuous

D) Random

34. _________ occurs when more storage is allocated than is actually requested.

A) External fragmentation

B) Memory Deallocation

C) Internal fragmentation

D) Memory Allocation

35. ______________is a simplistic method of sorting data that is used very commonly.

A) Insertion sort

B) Merge Sort

C) Selection Sort

D) Bubble Sort

36. __________bugs occur when a piece of memory is freed while there are still pointers to it.

A) Reference Pointer

B) Dangling Pointer

C) Double Free

D Garbage Collection

37. __________is one of the sorting techniques that is used for sequencing small lists.

A) Selection Sort

B) Bubble Sort

C) Merge sort

D) Insertion Sort

Page 8: MIT102-B1476-MQP

38. In heap sort heapify procedure picks the largest child key and compares it to the _____.

A) Parent node

B) Root node

C) largest leaf node

D) None of these

39. In graphs the ________is used to visit all of the nodes in the graph for its examination and

not always finds the shortest path.

A) Depth first search

B) Breadth first search

C) Linear Search

D) Binary Search

40. A ______________is a subgraph of a graph G that includes all the vertices of G and is also

a tree.

A) Binary tree

B) Binary Search Tree

C) Spanning tree

D) AVL tree

41. Binary search is one of the fastest ways to search the element in a sorted array.

A) True

B) False

42. Primary uses of external storage devices are:

A) Backup or overlay of program during execution.

B) Storage of programs, subprograms and data.

C) Storage of information in files.

D) All of above

43. The device that performs actual ________of data is a tape drive.

A) Reading

B) Writing

C) Both A and B

D) None of the above

Page 9: MIT102-B1476-MQP

44. A___________ is a metal cylinder coated with magnetic iron-oxide material on which data

and programs can be stored

A) Magnetic Tape

B) Magnetic Drum

C) Floppy Disk

D) Hard Disk

45. Ployphase is one of the popular sorting methods for ________ sorting.

A) Internal

B) External

C) Both A and B

D) None of the above

46. Which sorting technique is recommended for the runs holding the number of records less

than 15?

A) Heap

B) Selection

C) Merge

D) Insertion

47. The run lists are_______

A) The small batches created in external sorting

B) The large batches created in external sorting

C) The small batches created in internal sorting

D) The large batches created in internal sorting

48. Hashing is the technique that use mathematical functions to sort ______ data in a speedy

and organized fashion.

A) Incoming

B) Outgoing

C) Stored

D) Both A and B

Page 10: MIT102-B1476-MQP

49. The hashing function changes dynamically and at any given instant there can be at

most ______hashing functions used by the scheme.

A) One

B) Two

C) Three

D) Four

50. The open-addressing schemes are :

A) Linear Probing

B) Quadratic Probing

C) Double Hashing

D) All of above

Page 11: MIT102-B1476-MQP

Part B (Two mark questions)

51. When the data is stored in the memory in dispersed or non-sequential order is called _______

data structure . Examples of this data structure are ____ and ______.

A) Linear, stack, array

B) Non-linear, tree, graph

C) Non-linear, linked list, array

D) Linear, stack, queue

52. Select the correct statements about node in the linked list data structure

1. Each node in linked list consists of data field and next field.

2. A linked list consists of a serious of nodes, which are adjacent in memory.

3. START variable contains the address of the first node in the list.

4. Data field of node contains the element and next part contains the address of the next node.

A) All the statements are correct

B) only 1,2 and 3 are correct

C) only 1, 3 and 4 are correct

D) only 1,and 2 are correct

53. Match the following:

1. Floor and ceiling function

2. Remainder Function

3. Permutations

4. Factorial function

a. The term mode is used in remainder function.

b. Also called as greater or least integer function.

c. The product of the positive integers from 1 to n, inclusive, is denoted by n!

d. Is a set of n elements is an arrangement of the elements in a given order.

Page 12: MIT102-B1476-MQP

A) 1-b, 2-a,3-d, 4-c

B) 1-a,2-b,3-c,4-d

C) 1-b,2-c,3-a,4-d

D) 1-a,2-b,3-d,4-c

54. Match the following

1. Single alternative states

2. Double alternative states

3. Multiple alternative states

a. If the condition is true then Module A is executed otherwise Module B is executed.

b. If the condition is true then Module A is executed otherwise control is transferred to the next step

of the algorithm.

c. The logic of the structure allows only one of the modules to be executed.

A) 1-a,2-b,3-c

B) 1-b,2-a,3-c

C) 1-c,2-b,3-a

D) 1-b,2-a,3-c

55. Read the following statements and state true and false:

1. Traversing a linked list means processing each node of list at least once.

2. Searching a linked list is to find the location of an element in the list.

3. The deletion of a node from linked list is made just by a pointer change.

4. Deletion is the process of adding a new node to the linked list.

A) 1-T, 2-T,3-F,4-T

B) 1-F,2-F,3-T,4-F

C) 1-F,2-F,3-T,4-T

D) 1-F,2-T,3-T,4-F

Page 13: MIT102-B1476-MQP

56. In some situation it is required to traverse both forward and backward of a linked list. The linked

list with this property needs _______link field one to point the_____ node is called next link field and

another to point the _____node is called previous link field.

A) Two, previous, next

B) One, Previous, next

C) Two, next, previous

D) one , next previous

57. Implementation of stack can be done either using _______or ______. The main disadvantage of

array implementation of stack is that the _________of the array has to be fixed.

A) tree, graph, size

B) one way list, tree, size

C) two way list, graph, size

D) array, linked list, size

58. Which of the following are the applications of stack?

1. Evaluation of postfix expression

2. Infix to postfix conversion

A) Only 1

B) Only 2

C) Both 1 and 2

D) None of the above

Page 14: MIT102-B1476-MQP

59. Which the following statements are true in context of Queue data structure?

1. In queue deletions take place from one end called rear

2. In queue insertions take place from one end called front

3. Queue is a FIFO data structure

4. enqueue means adding a new item at the back of the queue

A) All are true

B) Only 3 and 4 is true

C) Only 1 and 2 is true

D) Only 1,2 and 3 is true

60. Match the following

1. Root

2. Parent

3. Sibling

4. Leaves

a. node that has a child

b. top most node in a tree

c. nodes with no children

d. node with the same parent

A) 1-b, 2-a, 3-d, 4-c

B) 1-b, 2-c, 3-a, 4-b

C) 1-a ,2-b, 3-c, 4-d

D) 1-d, 2-b, 3-c, 4-d

Page 15: MIT102-B1476-MQP

61. Binary tree is characterized by the fact that any node can have at most_____ branches.

For binary trees we distinguish between the subtree on the ________and on the ______.

A) two, left right

B) three, left, right

C) one, left right

D) zero, right, left

62. Match the following

1. Skewed binary tree

2. Full binary tree

3. Complete binary tree

a. A binary tree which has only left subtree is called left skewed tree and has only right

subtree is called right skewed tree.

b. is a binary tree in which every level is completely filled, and all nodes are left as possible.

c. o Each non leaf node has exactly two child nodes and all leaf nodes are at the same level.

A) 1-c,2-b,3-a

B) 1-a,2-c,3-b

C) 1-b,2-c,3-a

D) 1-b,2-a,3-c

Page 16: MIT102-B1476-MQP

63. Which of the following are the steps of converting a general tree into a binary tree?

1. The root of the general tree must be the root of the binary tree

2. Determine the first child of the root which is the leftmost node in the general tree at the

next level.

3. insert this node. The child – parent relationship in general tree would be considered in

binary tree also.

A) only 1 and 2

B) only 1

C) only 1 and 3

D) All 1,2 and 3

64. A tree T is called binary search tree if each node of n of T has the following property.

The value at n is _________ than every value in the____ subtree of n and is less than

every value in the _______ subtree of n.

A) Greater, left, right

B) Greater, right, left

C) Smaller, left, right

D) Smaller, right, left

65. State true and false in context of AVL search trees

1. An AVL tree is another balanced binary search tree named after their inventors, Adelson-

Velskii and Landis.

2. h(TR) – h(TL) is known as the balance factor. Where TL and TR is the height of left and right

subtrees respectively.

3. The balance factor of a node in a binary tree can have value 1, -1, 2.

A) 1-T, 2-T,3-F

B) 1-F, 2-T, 3-F

C) 1-T, 2-T, 3-T

D) 1-T, 2-F, 3-F

Page 17: MIT102-B1476-MQP

_______

66. During insertion in AVL tree, a ______rotation is a mirror of the_____ rotation operation.

LR is a _________ rotation.

A) Left, right, triple

B) Right, left, double

C) double, single, right

D) single, double, right

67. Match the following for graph data structure

1. Arch

2. Edge

3. Path

a. Directed link between two nodes

b. Undirected link between the nodes

c. is a sequence of consecutive edges

A) 1-a, 2-b, 3-c

B) 1-b, 2-c, 3-a

C) 1-c, 2-a, 3-b

D) 1-c, 2-a, 3-c

68. Match the following for graph data structure

1. Adjacent ( G, v1,v2)

2. Neighbors (G, v1)

3. get_node_value (G,v1)

a. returns the value associated with the node v1

b. lists all nodes y such that there is an edge from v1 to v2.

c. tests whether there is an edge from node v1 to node v2 .

Page 18: MIT102-B1476-MQP

A) 1-a, 2-b, 3-c B) 1-c, 2-b, 3-a C) 1-c, 2-a, 3-b D) 1-b, 2-a, 3-c

69. A ______defines a linear ordering on those nodes of a_________ graph that follows

the property: if node u is ______ of node v then v cannot be the predecessor of node u.

A) Heap sort, undirected graph, successor

B) Heap sort, directed graph, predecessor

C) Topological sort, undirected graph, successor

D) Topological sort, directed graph, predecessor

70. Identify the true statements in context of Dijkstra’s Algorithm

1. This algorithm is used to find the shortest path between the two vertices in a weighted

directed graph.

2. It is efficient to find each and every path from starting (source) to terminal vertices.

3. The time required by Dijkstra's algorithm is O(|V|2).

4. At each step, the aim is to make the temporary labels shorter by finding paths to the

associated vertices using the shortest paths to the permanent labeled vertices.

A) All 1,2,3,4

B) Only 1 and 2

C) Only 1,2 and 3

D) Only 3 and 4

Page 19: MIT102-B1476-MQP

71. Read the following statements and pick the correct option:

Basic principles of garbage collection are:

1. Scan for unallocated memory space.

2. Find data objects in a program that cannot be accessed in the future.

3. Delete the allocated data.

4. Reclaim the resources used by those objects.

A) 1, 2

B) 2, 4

C) 3, 4

D) 2, 3

72. Which of the following are the soring techniques?

1. Bubble

2. Binary

3. heap

4. Selection

A) Only 1, 2, and 4

B) Only 1 and 2

C) Only 3 and 4

D) None of the above

73. Match the following

1. Magnetic Tapes

2. Magnetic Drums

3. Magnetic Disks

4. Sectors

Page 20: MIT102-B1476-MQP

a. Are numbered divisions of the tracks designed to make data storage more manageable.

b. Are used to temporarily hold data that is not immediately required for computer operations.

c. Is a direct-access or random-access storage device.

d. Is an information storage medium consisting of a magnetisable coating on a thin plastic strip.

A) 1-a, 2-b, 3-c, 4-d

B) 1-a, 2-c, 3-b, 4-d

C) 1-d, 2-c 3-b, 4-a

D) 1-c, 2-d, 3-a, 4-b

74. Identify the true statements for polyphase sorting

1. Ployphase is one of the popular sorting methods for external sorting.

2. Distribution of the runs on the working tapes may affect the performance of the sort.

3. T requires the runs to be distributed evenly on T tapes.

4. Merged run is written on T-1 tape and remerging will take place with T working tapes until the

final run is formed on T.

A) All are true

B) Only 1 and 2 is true

C) Only 3 and 4 are true

D) None of the above

75. _______involves a _______function, which accepts a piece of_______ data and assigns to that

data a specific value.

A) Hashing, mathematical, outgoing

B) Hashing, hashing, outgoing

C) Hashing, mathematical, incoming

D) Hashing, hashing, incoming

Page 21: MIT102-B1476-MQP

Part C (Ten marks descriptive questions)

76. What is a data structure? Discuss briefly on types of data structures. [3+7]

Refer Unit 1, Section 1.3

77. What is linked list? Explain the process of insertion of node at the beginning of the linked

list. Also write algorithm for it. [4+6]

Refer Unit 3, Section 3.2 and 3.6.1

78. What is queue? Explain array implementation of queue. [7+3]

Refer unit 4, Section 4.4 and 4.4.1

79. Explain depth first search and depth first algorithms for graph traversal. [ 5+5]

Refer Unit 8, Section 8.6

Page 22: MIT102-B1476-MQP

Subject Name: Data and File Structure (MIT 102)

Answer Keys

Part A Part B

Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. key

1 B 26 C 51 B

2 A 27 B 52 C

3 D 28 B 53 A

4 C 29 D 54 B

5 A 30 B 55 D

6 B 31 A 56 C

7 D 32 B 57 D

8 A 33 B 58 C

9 C 34 C 59 B

10 B 35 D 60 A

11 D 36 B 61 A

12 D 37 A 62 B

13 C 38 A 63 D

14 B 39 A 64 A

15 C 40 C 65 D

16 A 41 A 66 B

17 C 42 D 67 A

18 D 43 C 68 B

19 C 44 B 69 B

20 C 45 B 70 A

21 A 46 B 71 B

22 B 47 A 72 A

23 A 48 A 73 C

24 B 49 B 74 B

25 A 50 D 75 D


Recommended