Final answer:
A for loop is a looping construct used to repeat a block of code for a specific number of times.
Step-by-step explanation:
The correct answer is B. counting while loop.
A for loop is a looping construct in many programming languages, including C++, Python, and Java. It is used to repeat a block of code for a specific number of times, typically when the number of iterations is known in advance. In a for loop, the number of iterations is controlled by a counter variable, which is initialized, tested, and incremented within the loop statement.
For example, in the following code snippet:
for(int i = 1; i <= 10; i++) {
the loop will execute 10 times, with the value of 'i' ranging from 1 to 10.