Data Structures Mock Test Questions and Answers

The Free download links of Data Structures Mock Test Questions and Answers Papers enclosed below. Candidates who are going to start their preparation for the Data Structures Mock Test papers can use these links. Download the Data Structures Mock Test Papers PDF along with the Answers. Data Structures Mock Test Papers are updated here. A vast number of applicants are browsing on the Internet for the Data Structures Mock Test Question Papers & Syllabus. For those candidates, here we are providing the links for Data Structures Mock Test Papers. Improve your knowledge by referring the Data Structures Mock Test Question papers.

Data Structures Mock Test Questions and Answers

Mock Test Questions and Answers on Data Structures

1. The basic unit of information is the
(a) Byte
(b) Block
(c) Bit
(d) sector

2. The most widely used method for interpreting bit settings as nonnegative integers is the
(a) Octal number system
(b) ANSI
(c) ASCII
(d) Binary number system

3. The method used by computers to represent real number is
(a) floating point notation
(b) mantissa
(c) base
(d) exponent

4. The variables which can be accessed by all modules in a program, are known as
(a) local variables
(b) internal variables
(c) external variables.
(d) global variables

5. In which kind of storage structure for strings, one can easily insert, delete, concatenate, and rearrange substrings?
(a) fixed length storage structure
(b) variable length storage with fixed maximum
(c) linked list storage
(d) array type storage

6. A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is known as
(a) full binary tree
(b) threaded tree
(c) 2-tree
(d) complete binary tree

7. 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
(a) Queues
(b) Trees
(c) Stack
(d) branch

8. Which data structure is needed to convert infix notations to postfix notations?
(a) Queue
(b) Tree
(c) Stacks
(d) branch

9. Which of the following operations is performed more efficiently by doubly linked list than by linear linked list?
(a) deleting a node whose location is given.
(b) searching an unsorted list for a given item.
(c) inserting a node after the node with a given location
(d) traversing the list to process cach node

10. Which of the following sorting procedure is the slowest ?
(a) Quick sort
(b) Shell sort
(c) Heap sort
(d) Bubble sort

11. A stack is a linear data structure in which data is stored and retrieved in a
(a) Last Out First In (LOFI)
(b) Last In First Out (LIFO)
(c) First In First Out (FIFO)
(d) Last Out Last In (LOLI)

12. The smallest element of an array’s index is called its
(a) Lower bound
(b) Range
(c) Upper bound
(d) Extraction

13. The C declaration
int b [100];
reserves _________ successive memory locations, each large enough to contain single integer.
(a) 200
(b) 100
(c) 10000
(d) 10

14. The C declaration
int A[3] [5];
containing _________ element, each of these elements is itself an array containing _________ integers.
(a) 3, 5
(b) 5, 3
(c) 5, 5
(d) 3, 3

15. This declaration
Struct(
char first [10];
char midinit;
char last [20];
}sname, ename;
Creates __________ structure variables, each of which contains ___________ member
(a) 3, 2
(b) 3, 3
(c) 2, 3
(d) 6,6

16. The postfix or of A+ (B*C) is
(a) ABC+*
(b) AB + C *
(c) ABC * +
(d) AB *C +

17. The postfix or of (A + B)* C is
(a) AB+ C*
(b) ABC *C+
(c) ABC * +
(d) AB * C +

18. The postfix form of A$B C – D + E/F/(G+ H) is
(a) AB $ C D – EF/GH +/+
(b) AB S C + D – EF/GH/+
(c) AB $*C – D + EF/GH/+
(d) AB $ C-D *EF/GH/ + +

19. The postfix form of A – B (C D$E) is
(a) ABCDE$*/-
(b) ABCDES-/*
(c) AB/C *DE $
(d) ABCDE /-* $

20. The prefix form of A – B/ (C*D $E) is
(a) -/* $ ACBDE
(b) -A/B *C $DE
(c) -ABCD*$DE
(d) -/BC*$DE

Practice Question Objective Papers
Quiz Important Papers
Mock Tests Previous Papers
Typical Question Sample Question
MCQs Model Papers

21. The prefix of (A + B) *(C-D) is
(a) +- AB * CD
(b) * +AB – CD
(c) *+-ABCD
(d) *AB+CD

22. What is the postfix form of the following prefix
– A/B C$DE
(a) ABCDE$*/-
(b) ABC*ED */
(c) A-BCDE$*/-
(d) A-BCDE-*$

23. What is the postfix form of the following prefix
*+AB-CD
(a) AB + CD – *
(b) AB+ CD -*
(c) ABC+*-
(d) AB+*CD-

24. The Fibonacci sequence is the sequence of integers
(a) 1, 3, 5, 7, 9, 11, 13, …
(b) 1, 3, 4, 7, 11, 18, 29, 47, . . .
(c) 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …
(d) 0, 1, 2, 3, 7, 15, . . .

25. A sort which uses the binary tree concept such that any number is larger than all the numbers in the subtree below it is called
(a) Selection sort
(b) Heap sort
(c) Insertion sort
(d) Quick sort

26. A full binary tree with n non leaf nodes contains
(a) log₂ n nodes
(b) 2n nodes.
(c) n + 1 nodes
(d) 2n + 1 nodes

27. A full binary tree with n leaves contains
(a) n nodes
(b) 2n – 1 nodes
(c) log₂ n nodes
(d) 2^{n} nodes

28. A sort which relatively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
(a) Insertion sort
(b) Heap sort
(c) Selection sort
(d) Quick sort

29. A sort which compares adjacent elements in a list and switches where necessary is a
(a) Insertion sort
(b) Quick sort
(c) Heap sort
(d) Bubble sort

30. A characteristic of the data that binary search uses but the linear search ignores is the
(a) order of the list
(b) maximum value in the list
(c) length of the list.
(d) mean of data values

31. A search procedure which associates an address with a key value and provides a mechanism for dealing with two or more values assigned to the same address is called
(a) linear search
(b) hash coded search
(c) binary search
(d) radix search

32. Which of the following sorting method is stable?
(a) Straight insertion sort
(b) Shell sort
(c) Binary insertion sort
(d) Heap sort

33. A graph G with n nodes is bipartite if it contains
(a) n edges
(b) no cycle of odd length
(c) a cycle of odd length
(d) n² edges

34. If each node in a tree have value greater than every value in its left sub tree and has value less than every value in its right subtree, the tree is known as
(a) complete tree
(b) binary search tree
(c) full binary tree
(d) threaded tree

35. Recursive procedures are implemented by
(a) Queues
(b) linked lists
(c) stacks
(d) strings

36. The postfix form of the following infix
(A + B) * (C*D-E)* F is
(a) AB+ CD + E – *F*
(b) AB+ CD – EF + – * *
(c) AB+ CD – EF + – **
(d) ABCDEF * – +*+

37. An _________ is a collection of items into which items can be inserted arbitrarily and from only the smallest item can be removed.
(a) descending priority queue
(b) FIFO queue
(c) ascending priority queue
(d) LIFO queue

38. In C a pointer variable to an integer can be created by the declaration
(a) int p *;
(b) int *p;
(c) int – *p;
(d) int $p;

39. Which of the following sorting algorithms has a worst case running time of O(n^{r}) where (1 <r < 2)?
(a) Bubble sort
(b) Shell sort
(c) Insertion sort
(d) Merge sort

40. Which of the following sorting algorithms does not have a worst case running time of O(n²)?
(a) Insertion sort
(b) Quick sort
(c) Merge sort
(d) Bubble sort

41. In which of the following sorting algorithm, the number of comparisons needed is the minimum if the items are initially in reverse order and is the maximum if the items are in order ?
(a) Straight insertion sort
(b) Heap sort
(c) Binary insertion sort
(d) Bubble sort

42. In what tree, for every node the height of its left subtree and right subtree differ at least by one
(a) Binary search tree
(b) Complete tree
(c) AVL tree
(d) Threaded binary tree

43. An undirected graph G with n vertices and e edges is represented by adjacency list. What is the time required to generate all the connected components ?
(a) O(n)
(b) O(e + n)
(c) O(e)
(d) O(e²)

44. A directed graph with n vertices and e edges are represented by Adjacency matrix. What is the time required to determine the in-degree of a vertex?
(a) O(c)
(b) O(n²)
(c) O(n)
(d) O(e + n)

45. A undirected graph with n vertices and e edges are represented by Adjacency matrix. What is the time required to determine whether the graph is connected?
(a) O(e)
(b) O(n²)
(c) O(n)
(d) O(e+n)

46. In what order the elements of a pushdown stack are accessed?
(a) First In First Out (FIFO)
(b) Last In First Out (LIFO)
(c) Last In Last Out (LILO)
(d) None of the above

47. A list of data items, usually words or bytes, with the accessing restriction that elements can b added or removed at one end of the list only, is known as
(a) Stack
(b) Memory
(c) Heap
(d) Linked list

48. Consider that n elements are to be sorted. What is the worst case time complexity of Shell sort ?
(a) O(n)
(b) O(n^{1.2})
(c) O(n log₂ n)
(d) O(n²)

49. Consider that n elements are to be sorted. What is the worst case time complexity of Bubble sort?
(a) O(1)
(b) O(n)
(c) O(log₂ n)
(d) O(n²)

50. Consider a linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer ?
(a) O(1)
(b) O(n)
(c) O(log₂ n)
(d) O(n log₂ n)