Engineering Questions with Answers - Multiple Choice Questions

# MCQs on Algorithm and Data Structure Specification

1 - Question

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

Explanation: 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 - Question

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

Explanation: They are more often written in a pseudo code language.

3 - Question

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

Explanation: All of the mentioned statement for pseudo code are correct.

4 - Question

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

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

5 - Question

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

Explanation: Data structures generally employ two implementation strategies- Contiguous Implementation and Linked Implementation.

6 - Question

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

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

7 - Question

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

Explanation: 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 - Question

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

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

9 - Question

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

Explanation: 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 - Question

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