C Programming and Data Structure MCQ Test Paper – II

C Programming and Data Structure MCQs with Answers for Competitive & Academic Exams.Data Structure

C Programming and Data Structure MCQ Test Paper-II

1. Stack is
A. Static data structure D
B. Dynamic data structure
C. Inbuilt data structure
D. None of these

2. “FRONT=REAR=NULL” pointer refers to empty-
A. stack
B. queue
C. array
D. none of the above

3. NULL pointer is used to tell
A. End of linked list
B. Empty pointer field of a structure
C. The linked list is empty
D. All of the above

4. Which of the following process is faster for threaded trees compared with their unthreaded counterparts?
A. Insertion
B. Deletion
C. Traversal
D. None of these

5. A B-tree of order n is also called
A. (n-n)-1 tree
B. n-(n-2) tree
C. (n-1)-n tree
D. None of these

6. A vertex with degree one in a graph is called-
A. Leaf
B. Pendant vertex
C. End vertex
D. None of these

7. The preorder traversal of a binary tree begins with-
A. Processing of the root node
B. Traversal of the right subtree in preorder
C. traversal of the left subtree in preorder
D. None of the above

8. Stack cannot be used to
A. Evaluate an arithmetic expression in postfix form
B. Implement recursion
C. Convert infix form to postfix of an expression
D. Allocate resources by the operating system

9. A sparse matrix is better represented using a/an:
A. Array
B. Binary tree
C. Multi-linked list
D. Stack

10. Modular programming uses-
A. Only top-down
B. Only bottom-up
C. Both a & b
D. None of these

11. While considering data structure implementation, the factors under considerations are:
A. Time
B. Time and space
C. Time, Space and processor
D. None of the above

12. Which is not true?
A. Abstract data type is a useful tool for specifying the logical properties of the data type.
B. While defining an abstract data type as a mathematical concept, space and efficiency is not a major concern.
C. Every abstract data type can be implemented using any programming language.
D. None of the above

13. Comparison of LRU and FIFO
A. FIFO IS always better
B. FIFO is always the worst
C. FIFO is sometimes better
D. Nothing can be said

14. DATA STRUCTURE
A. May be helpful to develop efficient algorithms in different phases of data processing.
B. Need not give a relationship between data items.
C. Is programming language-dependent.
D. None of the above.

15. Which is not true?
A. Abstract data type is a useful tool for specifying the logical properties of the data type.
B. While defining an abstract data type as a mathematical concept, space and efficiency is not a major concern.
C. Every abstract data type can be implemented using any programming language.
D. None of the above

16. A data structure, in which an element is added and removed only from one end is known as: –
A. Queue
B. Stack
C. Array
D. None of the above

17. Queue
A. Can be created by setting up an ordinary contiguous array to hold the items.
B. Can take care of delete operation automatically
C. Need one pointer to handle addition and deletion of an item.
D. None of the above.

18. Structured data type made up of a finite collection of ordered elements, all of which are of the same data type is-
A. Record
B. Array
C. File
D. None of the above

19. Implementation of the list in a dynamic fashion is
A. To call upon the system to allocate and free storage may not be time-consuming
B. A set of nodes is not reserved in advance for use.
C. The address computation is complex.
D. None of the above.

20. Memory allocation at the runtime is known as
A. Static memory allocation
B. Dynamic memory allocation
C. Paging
D. None of the above

21. Memory allocation at the compile time is known as
A. Static memory allocation
B. Dynamic memory allocation
C. Paging
D. None of the above

22. The most appropriate data structure in C to represent a linked list is
A. Array
B. Struct
C. Union
D. None of the above

23. Part of a compiler that keeps a record of names of variables and their associated attributes/values is known as a-
A. Parser
B. Symbol table
C. Lexical analyzer
D. None of the above

24. The set of native data type that a particular computer can support is determined by
A. type of Hardware Company
B. What functions have been wired into hardware?
C. What software support is required?
D. None of these

25. While considering data structure implementation, the factors under considerations are:
A. Time
B. Time and space
C. Time, Space and processor
D. None of the above

26. Which one is not a representation of a graph?
A. Adjacency matrix
B. Edge listing
C. Adjacency list
D. All represent graphs

27. A vertex with degree one in a graph is called-
A. Leaf
B. Pendant vertex
C. End vertex
D. None of these

28. In a top-down approach-
A. A problem is subdivided into subproblems; each one is attacked without worrying about others.
B. A problem is tackled from beginning to end in one go.
C. Subproblems are put together to solve the main problem.
D. None of these.

29.In a bottom-up approach-
A. A problem is subdivided into subproblems; each one is attacked without worrying about others.
B. A problem is tackled from beginning to end in one go.
C. Subproblems are solved first; then all solution of subproblems are put together to solve the main problem
D. None of these.

30. Modular programming uses-
A. Only top-down
B. Only bottom-up
C. Both a & b
D. None of these

31. An analysis of the algorithm, the approximate relationship between the size of the job and the amount of work required to do it is expressed by using-
A. Order of magnitude
B. Central tendency
C. Differential
D. None of these

32. Structured data type made up of a finite collection of ordered elements, all of which are of the same data type is called
A. Record
B. Array
C. File
D. None of these

33. Which is better computing time(in the analysis of algorithm)?
A. O(N)
B. O(N)2
C. O(logN)
D. none of these

34. Elements of the array are accessed by-
A. Accessing function in the built-in data structure.
B. Mathematical function
C. Index
D. None of these

35. Array is
A. linear data structure
B. non-linear data structure
C. complex data structure
D. none of these

36. Row-major order in the two-dimensional array refers to-
A. all elements of a row are stored in memory in sequence followed by next row in sequence and so on
B. all elements of a row are stored in memory in sequence followed by the next column in sequence and so on.
C. all elements of a column are stored in memory in sequence followed by the next column in sequence and so on.
D. all elements of a column are stored in memory in sequence followed by the next column in sequence and so on

37. A data structure, in which an element is added and removed only from one end is, is known as-
A. queue
B. stack
C. array
D. none of these

38. String concatenation means:-
A. combining two strings
B. extracting a substring out of a string
C. partitioning a string into two strings
D. none of these

39. A sparse matrix is better represented using a/an:
A. array
B. binary tree
C. multi-linked list
D. stack

40. Row major ordering of a rectangular array means:
A. columns are stored before rows
B. rows are stored in a sequence starting from the first element
C. greatest element of each row is stored first in memory.
D. none of the above

41. A is an array of size m*n, stored in the row-major order. If the address of the first element in the array is M, the address of the element A(I,j)(A(0,0) is the first element of the array and each element occupies one location in memory) is-
A. M+(i-j)*m+j-1
B. M+i*m+j
C. M+(j-1)*m+i-1
D. M+(i-1)*n+j-1

42. The array is a collection of
A. identical data objects
B. different data objects
C. Both a and b
D. None of these

43. When a one-dimensional character array of unspecified length is assigned an initial value.
A. an arbitrary character is automatically added to the end of the string
B. ‘\0’ is added at the end of the string
C. length of the string is added to the end of the string.
D. None of the above

44. Stack is
A. static data structure
B. dynamic data structure
C. inbuilt data structure
D. none of these

45. The stack cannot be used to
A. Evaluate an arithmetic expression in postfix form
B. Implement recursion
C. Convert infix form to postfix of an expression
D. Allocate resources by the operating system

46. Queue
A. Can be created by setting up an ordinary contiguous array to hold the items
B. Can take care of delete operation automatically
C. Need one pointer to handle addition and deletion of an item
D. None of the above.

47. Data structure-
A. Is programming language-dependent
B. need not give the relationship between data items
C. may be helpful to develop efficient algorithms in different phases of data processing
D. none of the above

48. “FRONT=REAR=NULL” pointer refers to empty-
A. stack
B. queue
C. array
D. none of the above

49. “get a node, store new element and insert the new node at the top” refers to insert operation in non-empty-
A. stack
B. queue
C. array
D. none of the above

50. The most appropriate data structure in C to represent a linked list is
A. array
B. struct
C. union
D. none of the above

51. Link of linked list in C is of type
A. unsigned integer
B. Pointer to integer
C. Pointer to struct
D. None of the above

52. This searching method requires that all keys must reside in internal memory.
A. Binary search
B. Sequential search
C. Hashing
D. None of these

53. In a linked list, the logical order of elements
A. Is the same as their physical arrangement
B. Is not necessarily equivalent to their physical arrangement
C. Is determined by their physical arrangement
D. None of the above.

54. Direct or random access of element is not possible in-
A. Linked list
B. Array
C. String
D. None of the above

55. In a linked list, the successive elements-
A. Must occupy contiguous space in memory
B. Need not occupy contiguous space in memory
C. Must not occupy contiguous space in memory
D. None of the above

56. The NULL pointer is used to tell
A. End of linked list
B. Empty pointer field of a structure
C. The linked list is empty
D. All of the above

57. Underflow condition in the linked list may occur when attempting to
A. Insert a new node when there is no free space for it
B. Delete a non-existent node in the list
C. Delete a node in the empty list
D. None of the above

58. Overflow condition in the linked list may occur when attempting to
A. Create a node when a free space pool is empty
B. Traverse the nodes when a free space pool is empty
C. Create a node when the linked list is empty
D. None of the above

59. The header of a linked list is a special node at the
A. End of linked
B. At the middle of the list
C. Beginning of the list
D. None of the above

60. Header linked list in which the last node points the header node is called
A. Grounded header
B. Circular header list
C. General header
D. None of the above

61. A technique, which collects all deleted space onto free storage list, is called-
A. Static memory
B. Garbage collection allocation
C. Dynamic allocation
D. None of the above

62. Which of the following process is faster for threaded trees compared with their unthreaded counterparts?
A. Insertion
B. Deletion
C. Traversal
D. None of these

63. Which of the following statements is TRUE in view of a threaded binary tree? It can have
A. NULL links but no structural links
B. Only structural links but no NULL links
C. Structural links and NULL links
D. None of these

64. Which of the following steps is performed first for in-order traversal of a binary tree?
A. Traversal of the left subtree in postorder.
B. Processing of the root node
C. Traversal of the left subtree in in-order
D. None of the above

65. A B-tree of order n is also called
A. (n-n)-1 tree
B. n-(n-2) tree
C. (n-1)-n tree
D. None of these

66. The preorder traversal of a binary tree begins with-
A. Processing of the root node
B. Traversal of the right subtree in preorder
C. Traversal of the left subtree in preorder
D. None of the above

67. If a binary search technique is used for accessing and implementing a symbol table, which of the following statements is TRUE? The ratio of-
A. Insertion time to access time for its entries is quite high
B. Access time to insertion time is quite high
C. Search time to insertion time is very high
D. None of the above

68. The post-order traversal of a binary tree begins
A. The post-order traversal of the left subtree
B. Processing of the root node
C. The post-order traversal of the right subtree
D. None of the above

69. In which case, adjacency list representation of a graph is not useful
A. When no of edges is small
B. When no of vertices are changing due to insertion and deletion
C. In breadth-first traversal
D. It is useful in all the above cases

70. The in-order traversal of some binary tree produced the sequence DBEAFC, and the post-order traversal of the same tree produced the sequence DEBFCA. Which of the following is a correct preorder traversal sequence?
A. DBAFCF
B. ABEDFC
C. ABDECF
D. None of these

71. The in-order traversal of some binary tree produced the sequence DBEAFC, and the post-order traversal of the same tree produced the sequence DEBFCA. What will be the total number of nodes on the left subtree of the given tree?
A. 1
B. 4
C. 5
D. None of these

72. Name the sort for which time is not proportional to n2
A. Merge sort
B. Bubble sort
C. Quicksort
D. None of these

73. This sort does not use divide & conquer methodology
A. Merge sort
B. Bubble sort
C. Quicksort
D. None of these

74. Name the sort in which array to be sorted is partitioned again & again in such a way that all elements less than or equal to partition element appear before it and those which are greater appear after it.
A. Merge sort
B. Quicksort
C. Selection sort
D. None of these

75. Worst-case efficiency of this search is n.
A. Sequential search
B. Binary search
C. Indexed search
D. None of these

76. Which is not a hashing technique?
A. Division remainder method
B. Folding
C. Mid square
D. All are hashing technique

77. Extra space in each record is kept for this collision processing method
A. Linear collision processing
B. Linked collision processing
C. Quadratic collision processing
D. None of these

78. This method of collision processing requires a prime area and overflow area.
A. Linked collision processing
B. Quadratic collision processing
C. Linear collision processing
D. None of these

79. In this method of collision processing, some of the addresses may remain unchecked.
A. Linear collision processing
B. Quadratic collision processing
C. Linked collision processing
D. None of these

80. In this search, keys must be ordered
A. Sequential search
B. Hashing
C. Binary search
D. None of these

Click here for C Programming and Data Structure MCQ Test Paper – I

Thanks for visiting our website, if you have any query regarding our MCQs services, please comment using the below comment box.

Share on Social Media

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *