Computer Applications
A physical education teacher asks the students to do the side stretch as shown below, 10 times. Which programming construct the teacher uses?

- if
- switch
- for
- if else if
Java Iterative Stmts
2 Likes
Answer
for
Reason — The teacher asks the students to do the side stretch 10 times, which means repeating the same action multiple times. In programming, the for loop is used to repeat a block of code a specific number of times. Hence, the teacher is using the concept similar to a for loop to instruct repetition.
Answered By
1 Like
Related Questions
Post Office is an example for …………… access specifier.
- public
- local
- protected
- private
Assertion (A): In switch case, break statement avoids fall through.
Reason (R): break statement helps to execute only one case at a time.
- Both (A) and (R) are true and (R) is a correct explanation of (A).
- Both (A) and (R) are true and (R) is not a correct explanation of (A).
- (A) is true and (R) is false.
- (A) is false and (R) is true.
The index(subscript) of the last element of an array ar[] is:
- ar.length()
- ar[].length
- ar.length() – 1
- ar.length – 1
Assertion (A): A clock is a real-life example of nested loops.
Reason (R): The hour hand moves through 12 positions, while the minute hand moves through 60 positions within each hour.
- Both (A) and (R) are true and (R) is a correct explanation of (A).
- Both (A) and (R) are true and (R) is not a correct explanation of (A).
- (A) is true and (R) is false.
- (A) is false and (R) is true.