Which of the following is a selection structure?(1 point)

Responses

while
while

if
if

for
for

do

1 answer

The correct answer is if.

The if statement is a selection structure, which means it allows the program to choose between different paths based on a condition. The other options (while, for, do) are types of looping structures, which repeatedly execute a block of code as long as a certain condition is true.