1. Which of the following statements allows you to execute one out of two alternate blocks?
a. if
b. while
c. if else
2. Which of the following statement is looping statement?
a. if else
b. float
c. for
3. Which of these is a jump statement?
a. int
b. break
c. float
4. Which of the following statements forces the next iteration of the loop to take place?
a. break
b. if else
c. continue
Answers
Answer:
1) if-else
2)for
3)break
4) continue
Answer:
1) c. if else
2) c. for
3) b. break
4) c. continue
Explanation:
if else statement
When using the if-else statement, two actions are taken in response to a single condition. The if-else statement is an addition to the if statement that allows us to execute two separate actions, one to check if a condition is true and the other to check whether it is false. Here, it is important to note that the if and else blocks cannot be run concurrently. Since every, if condition always triggers an otherwise case, using an if-else statement is always preferred.
loops
Loop, which enables the execution of one or more statements as many times as needed. All high-level programming languages include a variety of looping constructs that may be used to continually execute one or more sentences.
break
When a break statement appears inside a loop, the loop is instantly broken, and the program control moves on to the statement that follows the break.
In the switch statement, it may be utilized to end a case.
continue
The continue command skips any code in between and instead of forcing termination, forces the next iteration of the loop.
The conditional test and increment parts of the for loop run when the continue statement is used. The continue statement makes the conditional tests the program's control target for the while and do-while loops.
To know more about loops, click on the link below:
https://brainly.in/question/14646776
To know more about the if-else statements, click on the link below:
https://brainly.in/question/16088078
#SPJ3