Computer Applications

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.

  1. Both (A) and (R) are true and (R) is a correct explanation of (A).
  2. Both (A) and (R) are true and (R) is not a correct explanation of (A).
  3. (A) is true and (R) is false.
  4. (A) is false and (R) is true.

Java Nested for Loops

4 Likes

Answer

Both (A) and (R) are true and (R) is a correct explanation of (A).

Reason — A clock is a real-life example of nested loops because the hour hand moves through 12 positions, and within each hour, the minute hand moves through 60 positions. This shows that one loop (minute hand) runs inside another loop (hour hand), which is similar to the concept of nested loops in programming.

Answered By

1 Like


Related Questions