WGU-D684 Exam Study Questions with
Answers Graded A+ 2025
Which is an example of an integer data type?
- 3.14
- "Hello"
- True
- 42 -Correct Answer ✔42
Which data type is used to represent textual data?
- Boolean
- String
- Integer
- Float -Correct Answer ✔String
Which variable name is valid in most programming languages?
- variable_123
- 123variable
- variable 123
- variable-123 -Correct Answer ✔variable_123
Which statement correctly assigns the value 10 to the variable x?
- x == 10
- x => 10
- x = 10
D684
,D684
- 10 = x -Correct Answer ✔x = 10
Which is used for iteration in programming?
- If statement
- Print statement
- While loop
- Assignment statement -Correct Answer ✔While loop
Which value is a floating-point number?
- "3.14"
- 42
- 3.14
- True -Correct Answer ✔3.14
Which loop continues as long as a specified condition is true?
- Do-while
- While
- For
- Repeat -Correct Answer ✔While
What is the primary characteristic of a queue?
- Elements are stored in a fixed-size structure
- There is FIFO access.
- There is LIFO access.
- Elements can be inserted and removed at any position -Correct Answer ✔There is FIFO
access.
D684
,D684
What is an array?
- A set of elements accessed in a LIFO order
- A data structure where each element contains a reference to the next
- A dynamic-size collection of different data types
- A fixed-size collection of elements of the same type -Correct Answer ✔A fixed-size
collection of elements of the same type
What is a subprogram?
- A data structure that allows FIFO access
- A sequence of program instructions that perform a specific task
- A variable that holds multiple values
- A structure for storing elements at contiguous memory locations -Correct Answer ✔A
sequence of program instructions that perform a specific task
In pseudocode, how would you call a function named CalculateSum with two
parameters a and b?
- CalculateSum(a, b)
- Execute CalculateSum with a, b
- sum = CalculateSum(a, b)
- CALL CalculateSum a b -Correct Answer ✔CalculateSum(a, b)
What is the primary purpose of using subprograms in a program?
- To store data persistently
- To allow for code reuse and better organization
- To increase the program's complexity
D684
, D684
- To slow down the program execution -Correct Answer ✔To allow for code reuse and
better organization
Which operation is used to add an element to the top of a stack?
- Append
- Push
- Pop
- Enqueue -Correct Answer ✔Push
Which scenario is a stack most suitable for?
- Managing tasks in a printer queue
- Storing undo operations in a text editor
- Maintaining a playlist of songs
- Scheduling processes in an operating system -Correct Answer ✔Storing undo
operations in a text editor
What is the main purpose of object-oriented programming (OOP)?
- To improve the performance of the program
- To organize code into reusable components called objects
- To use a procedural approach for problem-solving
- To execute code sequentially -Correct Answer ✔To organize code into reusable
components called objects
Which statement describes a class in OOP?
- A specific instance of an object
- A variable that holds multiple values
D684