Asked by Jessica Wageman on May 11, 2024
Verified
Before accumulating values, the accumulator variable should be initialized to ____.
A) -1
B) 0
C) 1
D) NULL
Initialized
The process of assigning an initial value to a variable at the time of its declaration.
- Know how to use and the importance of initializing variables in loops.
Verified Answer
JR
Jacqueline RowleyMay 13, 2024
Final Answer :
B
Explanation :
The accumulator variable should be initialized to 0 before accumulating values to ensure that it starts from a neutral base, allowing for accurate addition of subsequent values.
Learning Objectives
- Know how to use and the importance of initializing variables in loops.