WGU E010 FOUNDATIONS OF
PROGRAMMING ADVANCED
ASSESSMENT
1. Which Boolean operator results in true only if both operands are true?
A. OR
B. XOR
C. NOT
D. AND
Answer: D
Conceptual Explanation: The AND operator requires all input conditions to be true for the
result to be true.
2. In programming, what is the term for a logical error that occurs when a loop executes one
too many or one too few times?
A. Infinite loop
B. Off-by-one error
C. Syntax error
,D. Buffer overflow
Answer: B
Conceptual Explanation: An off-by-one error happens when a loop iterates one time more
or less than intended, often due to incorrect boundary conditions.
3. Which data structure follows the Last-In-First-Out (LIFO) principle?
A. Queue
B. Array
C. Linked List
D. Stack
Answer: D
Conceptual Explanation: A stack is a linear data structure where the last element added is
the first one to be removed.
4. What is the primary difference between a ‘while’ loop and a ‘do-while’ loop?
A. The do-while loop ensures the body is executed at least once before checking the
condition.
B. The do-while loop evaluates the condition before the first execution.
C. The while loop runs at least once regardless of the condition.
D. There is no functional difference between the two.
, Answer: A
Conceptual Explanation: A do-while loop is an exit-controlled loop, meaning the code
block runs once before the condition is ever tested.
5. Which of the following is a characteristic of a low-level programming language?
A. High abstraction from hardware
B. Portability across different operating systems
C. Easier for humans to read and write
D. Direct control over CPU and memory
Answer: D
Conceptual Explanation: Low-level languages like Assembly provide little abstraction and
allow direct manipulation of hardware components.
6. What does the term ‘scope’ refer to in the context of variables?
A. The visibility and lifetime of a variable within parts of a program.
B. The amount of memory a variable occupies.
C. The data type assigned to a variable.
D. The speed at which a variable can be accessed.
Answer: A
PROGRAMMING ADVANCED
ASSESSMENT
1. Which Boolean operator results in true only if both operands are true?
A. OR
B. XOR
C. NOT
D. AND
Answer: D
Conceptual Explanation: The AND operator requires all input conditions to be true for the
result to be true.
2. In programming, what is the term for a logical error that occurs when a loop executes one
too many or one too few times?
A. Infinite loop
B. Off-by-one error
C. Syntax error
,D. Buffer overflow
Answer: B
Conceptual Explanation: An off-by-one error happens when a loop iterates one time more
or less than intended, often due to incorrect boundary conditions.
3. Which data structure follows the Last-In-First-Out (LIFO) principle?
A. Queue
B. Array
C. Linked List
D. Stack
Answer: D
Conceptual Explanation: A stack is a linear data structure where the last element added is
the first one to be removed.
4. What is the primary difference between a ‘while’ loop and a ‘do-while’ loop?
A. The do-while loop ensures the body is executed at least once before checking the
condition.
B. The do-while loop evaluates the condition before the first execution.
C. The while loop runs at least once regardless of the condition.
D. There is no functional difference between the two.
, Answer: A
Conceptual Explanation: A do-while loop is an exit-controlled loop, meaning the code
block runs once before the condition is ever tested.
5. Which of the following is a characteristic of a low-level programming language?
A. High abstraction from hardware
B. Portability across different operating systems
C. Easier for humans to read and write
D. Direct control over CPU and memory
Answer: D
Conceptual Explanation: Low-level languages like Assembly provide little abstraction and
allow direct manipulation of hardware components.
6. What does the term ‘scope’ refer to in the context of variables?
A. The visibility and lifetime of a variable within parts of a program.
B. The amount of memory a variable occupies.
C. The data type assigned to a variable.
D. The speed at which a variable can be accessed.
Answer: A