WGU C949 Data Structures and Algorithms I
Objective Assessment Practice Exam
100+ Questions with Answers and Rationales
Question 1
Which term describes a way of organizing, storing, and performing operations on data?
A) Vertex
B) Record
C) Algorithm
D) Data structure
Answer: D) Data structure
Rationale: A data structure is a specialized format for organizing, processing, retrieving, and storing
data. It defines a way of organizing data items and the operations that can be performed on them.
Question 2
What is a record in the context of data structures?
A) A data structure that stores an ordered list of items
B) A data structure that stores subitems with a name associated with each subitem
C) A data structure that uses nodes connected by references
D) A data structure that maps keys to values
Answer: B) A data structure that stores subitems with a name associated with each subitem
Rationale: A record is a data structure that stores subitems (often called fields), with each subitem
having a name. This allows for organized storage of related data elements.
,Question 3
Which characteristic of a class allows it to be used as an abstract data type (ADT)?
A) Overloading
B) Instantiation
C) It consists of variables and methods
D) Overriding
Answer: C) It consists of variables and methods
Rationale: An Abstract Data Type (ADT) is defined by the operations that can be performed on it and
the data it contains. A class supports ADT implementation by encapsulating both data (variables) and
operations (methods) together.
Question 4
Which term refers to a template for creating an object?
A) Record
B) Instance
C) Class
D) Object
Answer: C) Class
Rationale: A class serves as a blueprint or template for creating objects. It defines the properties and
behaviors that objects of that type will have. Objects are instances of classes.
Question 5
What is the result when 6 is enqueued to the queue [7, 9, 8] with 7 as the front?
,A) [6, 7, 9, 8]
B) [7, 9, 8, 6]
C) [6, 7, 9]
D) [7, 9, 6]
Answer: B) [7, 9, 8, 6]
Rationale: A queue is a FIFO (First-In, First-Out) data structure. The enqueue operation adds items to
the back (end) of the queue. Since the current queue is [7, 9, 8], adding 6 to the back results in [7, 9, 8,
6].
Question 6
Which value would be returned from executing the dequeue operation on the queue [7, 9, 8] with 7 as
the front?
A) 7
B) 9
C) 8
D) 7, 9, 8
Answer: A) 7
Rationale: The dequeue operation removes and returns the item at the front of the queue. Since 7 is
at the front, it is returned. After dequeue, the queue would be [9, 8].
Question 7
Which ADT is characterized by the LIFO (Last-In, First-Out) principle?
A) Array
, B) Stack
C) Queue
D) List
Answer: B) Stack
Rationale: A stack is a LIFO data structure where the last item inserted is the first item removed.
Operations include push (add to top) and pop (remove from top).
Question 8
What will the peek() operation from this stack return? Stack (top to bottom): [8, 9, 3, 5]
A) 8
B) 5
C) 3
D) 9
Answer: A) 8
Rationale: The peek operation returns the item at the top of the stack without removing it. Since the
stack is shown with the top item first (8 is at the top), peek returns 8.
Question 9
Which queue operation removes an item from the front of the queue?
A) dequeue
B) enqueue
C) push
D) peek
Objective Assessment Practice Exam
100+ Questions with Answers and Rationales
Question 1
Which term describes a way of organizing, storing, and performing operations on data?
A) Vertex
B) Record
C) Algorithm
D) Data structure
Answer: D) Data structure
Rationale: A data structure is a specialized format for organizing, processing, retrieving, and storing
data. It defines a way of organizing data items and the operations that can be performed on them.
Question 2
What is a record in the context of data structures?
A) A data structure that stores an ordered list of items
B) A data structure that stores subitems with a name associated with each subitem
C) A data structure that uses nodes connected by references
D) A data structure that maps keys to values
Answer: B) A data structure that stores subitems with a name associated with each subitem
Rationale: A record is a data structure that stores subitems (often called fields), with each subitem
having a name. This allows for organized storage of related data elements.
,Question 3
Which characteristic of a class allows it to be used as an abstract data type (ADT)?
A) Overloading
B) Instantiation
C) It consists of variables and methods
D) Overriding
Answer: C) It consists of variables and methods
Rationale: An Abstract Data Type (ADT) is defined by the operations that can be performed on it and
the data it contains. A class supports ADT implementation by encapsulating both data (variables) and
operations (methods) together.
Question 4
Which term refers to a template for creating an object?
A) Record
B) Instance
C) Class
D) Object
Answer: C) Class
Rationale: A class serves as a blueprint or template for creating objects. It defines the properties and
behaviors that objects of that type will have. Objects are instances of classes.
Question 5
What is the result when 6 is enqueued to the queue [7, 9, 8] with 7 as the front?
,A) [6, 7, 9, 8]
B) [7, 9, 8, 6]
C) [6, 7, 9]
D) [7, 9, 6]
Answer: B) [7, 9, 8, 6]
Rationale: A queue is a FIFO (First-In, First-Out) data structure. The enqueue operation adds items to
the back (end) of the queue. Since the current queue is [7, 9, 8], adding 6 to the back results in [7, 9, 8,
6].
Question 6
Which value would be returned from executing the dequeue operation on the queue [7, 9, 8] with 7 as
the front?
A) 7
B) 9
C) 8
D) 7, 9, 8
Answer: A) 7
Rationale: The dequeue operation removes and returns the item at the front of the queue. Since 7 is
at the front, it is returned. After dequeue, the queue would be [9, 8].
Question 7
Which ADT is characterized by the LIFO (Last-In, First-Out) principle?
A) Array
, B) Stack
C) Queue
D) List
Answer: B) Stack
Rationale: A stack is a LIFO data structure where the last item inserted is the first item removed.
Operations include push (add to top) and pop (remove from top).
Question 8
What will the peek() operation from this stack return? Stack (top to bottom): [8, 9, 3, 5]
A) 8
B) 5
C) 3
D) 9
Answer: A) 8
Rationale: The peek operation returns the item at the top of the stack without removing it. Since the
stack is shown with the top item first (8 is at the top), peek returns 8.
Question 9
Which queue operation removes an item from the front of the queue?
A) dequeue
B) enqueue
C) push
D) peek