Which of the following is used to control the flow of a program?
Correct Answer: C) Loop
A loop is used to control the flow of a program by repeatedly executing a block of code as long as a specified condition is true. It allows programs to perform repetitive tasks without writing the same code multiple times.
Common types of loops include for, while, and do-while loops. Loops are crucial for controlling program execution based on conditions and iterating through data structures like arrays or lists.
Why the Other Choices are Incorrect:
Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.
You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams