switch case can be a replacement for which of the following A. if B. while C. do while D. if else
Answers
Answered by
3
Answer:
If is correct answer.......
Answered by
0
Answer:
D
Switch with if, else if, else, and loops inside case. ... Let's say value is currently 1, we go to case 1 and our for loop goes through the array to see if each element matches with the whatever_value variable. In this case if it does, we declare the value variable to be equal to 2, and we break out of the loop.
Similar questions