C Programming and Data Structure MCQ Test Paper-I

C Programming and Data Structure MCQ Test Paper – I

C Programming

1. Pseudocode is a representation of the code required for ___.
A. A Program
B. An Algorithm
C. A single Instruction
D. None of the above

2. In Pseudocode part consists of?
A. Sequence
B. Selection
C. Iteration
D. All of the above

3. Each Algorithm begins with a ___.
A. Condition
B. Parameter
C. Return Statement
D. Header

4. A purpose in algorithm needs to describe___.
A. Program Execution
B. Processing
C. Requirements
D. None of the above

5. Precondition lists what kind of requirements?
A. Processing
B. Precursor
C. Output
D. Searching

6. Parameters can be passed by___.
A. Value
B. Reference
C. Both A & B
D. None of the above

7. Which of the option is a rule for defining the names for the variables?
A. Do not use single character names
B. Do not use Generic names
C. Abbreviations are not excluded as intelligent names
D. All of the Above

8. Assign and add are ___ statements.
A. Sequence
B. Selection
C. Iteration
D. All of the above

9. Selection statement evaluates___.
A. An increment statement
B. A condition statement
C. An assignment statement
D. A declaration statement

10. ___ is the primary concept behind abstract data types.
A. Inheritance
B. Polymorphism
C. Encapsulation
D. Abstraction

11. The opposite of atomic data is?
A. Colossal
B. Enormous
C. Gargantuan
D. Composite

12. An array is a ___ sequence.
A. Heterogeneous
B. Homogeneous
C. Association
D. Assorted

13. The generalization of operations with unspecified implementations is known as ___.
A. Inheritance
B. Abstraction
C. Encapsulation
D. Data hiding

14. What is used to call a sequence of character?
A. String
B. List
C. Stack
D. Queue

15. A linear collection of data elements where the linear node is given by means of the pointer is called ___.
A. Linked List
B. Node List
C. Primitive list
D. None of these

16. Indexing is also called ___.
A. Pattern matching
B. Pattern making
C. Pattern searching
D. Pattern completing

17. The total number of comparisons in bubble sort is?
A. O (n2)
B. O (2n)
C. O (nlogn)
D. None of the above

18. In Linked List there are no NULL links in?
A. Single Linked List
B. Doubled Linked List
C. Circular Linked List
D. None of the above

19. A tree is height-balanced if the heights of the left and right subtrees of each node are within?
A. 0
B. 1
C. 2
D. None of the above

20. The nth element from the top of the stack S is accessible as:
A. S [Top-n]
B. S [Top + n]
C. S [Top –n –1]
D. None of the above

21. A node n is adjacent to a node m if there is an arc from
A. m to n
B. n to m
C. Either m to any node or n to any node
D. None of the above

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

23. Which of the following is a hash function?
A. Folding
B. Quadratic probing
C. Chaining
D. Open Addressing

24. An adjacency matrix representation of a graph cannot contain information of:
A. Nodes
B. Edges
C. Direction of Edges
D. Parallel edges

25. What is the non-FIFO implementation of Queues called?
A. Priority Queue
B. Circular Queue
C. Normal Queue
D. None of the above

26. Convert into prefix notation: A * B + C / D
A. + * A B / C D
B. + * A / B C D
C. + * A B C D /
D. None of the above

27. Convert into postfix notation: A * (B + C / D)
A. A /B C D + *
B. A B C D / + *
C. A B* C D / +
D. None of the above

28. ISAM stands for:
A. International standards for Air force Machinery
B. Indexed Sequential Access Method
C. Indexed Searching Arranged method
D. None of the above

29. Suppose Cursor refers to a node in a linked list (using the Node class with instance variables called data and link). What Boolean expression will be true when the cursor refers to the tail node of the list?
A. (Cursor == null)
B. (Cursor. link == null)
C. (Cursor. data == null)
D. (Cursor. data == 0.0)

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

31. 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

32. Sorting is not possible by using which of the following methods?
A. Insertion
B. Selection
C. Exchange
D. Deletion

33. A binary tree with 20 nodes has null branches?
A. 20
B. 19
C. 21
D. None of the above

34. In-tree construction, which is a suitable efficient data structure?
A. Array
B. Linked list
C. Stack
D. Queue

35. How many different trees are possible with 10 nodes?
A. 1014
B. 1016
C. 1113
D. None of the above

36. Traverse the given tree using In-order.
A. D H B E A F C I G J
B. A B D H E C F G I J
C. H D E B F I J G C A
D. None of the above

37. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
A. 8
B. 15
C. 13
D. 14

38. Which one is a type of Collision Resolution Technique?
A. Flooding
B. Quadratic probing
C. Chaining
D. Open Addressing

39. Backtracking is another name for this method of traversal
A. Depth-first
B. Breadth-first
C. D-search
D. None of these

40. Which is the simplest file structure?
A. Sequential
B. Indexed
C. Random
D. None of the above

41. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
A. Yes
B. No
C. Both yes and no
D. Can’t say

42. Find the expression for the binary tree:
A. A * B – (C + D) * (P / Q)
B. A * B * (P / Q) – (C + D)
C. (C + D) -A * B * (P / Q)
D. A *(B –C) + D* (P / Q)

43. Which method of traversal does not use the stack to hold nodes
A. Breadth-first
B. Depth-first
C. D-search
D. None of these

44. What is the bucket size, when the overlapping and collision occur at the same time?
A. 0
B. 1
C. 2
D. 3

45. The Minimum number of queues needed to implement the priority queue?
A. 0
B. 1
C. 2
D. 3

46. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
A. Void Pointer
B. Integer Pointer
C. Float Pointer
D. Pointer to a Pointer

47. What are the major data structures used in the RDBMS?
A. Linked Lists
B. Graphs
C. Arrays
D. Strings

48. Every recursive function has it’s equivalent ___ function.
A. Iterative
B. Recursive
C. Both A & B
D. None of the above

49. What are the major data structures used in the Hierarchical data model?
A. Array
B. Graph
C. Linked List
D. Trees

50. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix notation.
A. ^ – * +ABC – DE + FG
B. ^ – ABC * +- DE + FG
C. ^ +A- * BC – DE + FG
D. ^ – * AB+C – DE + FG

51. If there are n nodes, there exist ___different trees.
A. 2n
B. 2n-1
C. 2n-n
D. 2n-n-1

52. What is the complexity of Binary Search?
A. O (n)
B. O (n/2)
C. O (n logn)
D. None of these

53. In RDBMS, what is the efficient data structure used in the internal storage representation?
A. B-tree
B. B+ Tree
C. AVL tree
D. None of the above

54. Convert the given graph with weighted edges to the minimal spanning tree.
A. 2 1 3 4 5
B. 2 1 4 3 5
C. 1 3 2 4 5
D. 4 1 2 3 5

55. Breadth-first search –
A. Scans all incident edges before moving to another vertex
B. Scans adjacent unvisited vertex as soon as possible
C. Is same as backtracking
D. None of these

56. Which of the following abstract data types are NOT used by the Integer Abstract Data type group?
A. Int
B. Float
C. Double
D. Char

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

58. How many parts are there in a declaration statement?
A. 1
B. 2
C. 3
D. 4

59. A pointer to a pointer is a variable whose value is ___ of another pointer variable.
A. An Address
B. The Value
C. Both A & b
D. None of the above.

60. What does the symbol * signifies?
A. Tells the computer that you are declaring a pointer
B. Tells the computer that you are declaring a variable
C. Both A and B
D. None of the above

61. A multidimensional array consists of ___ arrays defined by sets of array elements.
A. 0
B. 1
C. 2 or more
D. None of the above

62. Elements of an array are stored ___ in memory.
A. Periodical
B. Sequentially
C. Parallel
D. None of the above

63. Allocating memory at runtime is also called as?
A. Statically allocating memory
B. Dynamically allocating memory
C. Sequentially allocating memory
D. All of the above

64. ___ is the way you groups things together by placing one thing on top of another and then removing things one at a time from the top.
A. Array
B. Stack
C. Pointer
D. All of the above

65. ___ Method places a value onto the top of a stack.
A. push() member method
B. pop() member method
C. isFull() member method
D. is Empty() member method

66. ___ Method removes the value from the top of a stack?
A. push () member method
B. pop () member method
C. isFull () member method
D. is Empty() member method

67. Data in a queue is accessible.
A. First in First out
B. First in last out
C. Last in First out
D. None of the above

68. The ___ process places data at the back of the queue.
A. Queue
B. Enqueue
C. Dequeue
D. Priority queue

69. A stack-linked list is a data structure that uses a ___ to create a stack.
A. Linked List
B. Queue
C. Doubly linked list
D. None of the above

70. What happens when you push a new node onto a stack?
A. The new node is placed at the front of the linked list.
B. The new node is placed at the back of the linked list.
C. The new node is placed in the middle of the linked list.
D. No Changes happens

71. In an array queue, data is stored in an ___ element.
A. Node
B. Linked list
C. Array
D. Constructor

72. Parent Node is also called ___ Node.
A. Main
B. Root
C. Branch
D. Stem

73. What is a leaf node?
A. A leaf node is a node, which does not contain any child node.
B. A leaf node has zero or one node is connected to it.
C. Both A & B
D. None of the above.

74. The depth of the tree is ___ of a tree.
A. Number of nodes on the tree.
B. Number of levels of a tree.
C. Number of branches.
D. None of the above.

75. What is the size of a void pointer?
A. 0 bytes
B. 1 bytes
C. 2 bytes
D. 4 bytes

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

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

78. In 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.

79. In 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.

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

C Programming and Data Structure MCQ Test Paper – II

General Knowledge questions with answers for competitive exams

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

Leave a Comment

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

Scroll to Top