250+ MCQs on Algorithm and Data Structure Specification and Answers

Software Design Interview Questions and Answers for Experienced people on “Algorithm and Data Structure Specification”.

1. Algorithms may be stated in an operation specification for which of the following reasons?
a) An algorithm may be stated to provide a procedural specification of the operation’s behavior
b) An algorithm may be stated to specify that the algorithm is to be used in the implementation
c) All of the mentioned
d) None of the mentioned

Answer: c
Clarification: Algorithms may be stated in an operation specification for two reasons An algorithm may be stated to provide a procedural specification of the operation’s behavior and An algorithm may be stated to specify that the algorithm is to be used in the implementation.

2. What is minispec?
a) It is a step-by-step description of how an operation transforms its inputs to outputs
b) Calls to other operations may be included in minispec
c) They are more often written in a pseudo code language
d) All of the mentioned

Answer: d
Clarification: They are more often written in a pseudo code language.

3. Figure out the incorrect statements for pseudo code?
a) Pseudo code is English augmented with programming language constructs
b) It offers much of the ease and power of expression of English together with the precision of a programming language
c) There are many versions of pseudo code and no widely accepted standard
d) None of the mentioned

Answer: d
Clarification: All of the mentioned statement for pseudo code are correct.

4. What are Abstract Data Type?
a) They are a set of values and operations for manipulating those values
b) They are a scheme for storing values in computer memory
c) Arrays, stacks, queues, lists, and trees are all examples of abstract data types
d) They are a set of values and operations for manipulating those values, Arrays, stacks, queues, lists, and trees are all examples of abstract data types

Answer: d
Clarification: Data Structure is a scheme for storing values in computer memory and rest other are true.

5. Data structures generally employ which of the following implementation strategies?
a) Contiguous Implementation
b) Linked Implementation
c) All of the mentioned
d) None of the mentioned

Answer: c
Clarification: Data structures generally employ two implementation strategies- Contiguous Implementation and Linked Implementation.

6. What is Linked Implementation?
a) Values are stored in adjacent memory cells
b) Values are not necessarily stored in adjacent memory cells and are accessed using pointers or references
c) Values are not stored in adjacent memory cells
d) None of the mentioned

Answer: b
Clarification: Linked Implementation-Values are not necessarily stored in adjacent memory cells and are accessed using pointers or references.

7. What is data structure diagram?
a) A simple graphical notation is traditionally used to depict data structures
b) It is a scheme for storing values in computer memory
c) All of the mentioned
d) None of the mentioned

Answer: a
Clarification: A simple graphical notation is traditionally used to depict data structures are data structure diagram and a data structure is a scheme for storing values in computer memory.

8. The contiguous structures stores record in which of the field location?
a) The left subtree
b) The right subtrees
c) The node
d) All of the mentioned

Answer: d
Clarification: The contiguous structures are records with three fields storing pointers to the left and right subtrees and the data stored at the node.

9. What is a Reference denoted by?
a) They to memory cells are represented by pointer arrows originating in the memory cell rectangles
b) A dot represents the null pointer
c) They are represented by connecting disjoint collections of arrays or records with pointer arrows
d) They to memory cells are represented by pointer arrows originating in the memory cell rectangles & dot represents the null pointer

Answer: d
Clarification: References or pointers to memory cells are represented by pointer arrows originating in the memory cell rectangles. A dot represents the null pointer or reference and Linked data structure implementations are represented by connecting disjoint collections of arrays or records with pointer arrows.

10. Which of the following are the heuristics for data structure diagram?
a) Label record fields only once
b) Use ellipses to simplify large, repetitive structures
c) Draw linked structures so that the pointers point down the page or from left to right
d) All of the mentioned

Answer: d
Clarification: All of the mentioned are the heuristics for data structure diagram.

Leave a Reply

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