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.
- 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.
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.
Related Questions
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
The index(subscript) of the last element of an array ar[] is:
- ar.length()
- ar[].length
- ar.length() – 1
- ar.length – 1
Which of the following pairs of methods will cause a compile-time error due to incorrect method overloading?
- void test(int a, int b) and void test(double a, double b)
- void test(int a, double b) and void test(double a, int b)
- void test(int a, double b) and void test(int a)
- void test(int a) and int test(int a)
Which of the following converts "25" to 25.0?
- Double.Parsedouble("25")
- Double.parse("25")
- Double.parseDouble("25")
- Double.parseDouble(25)