English

Given: for (i = 0; i < 4; i++) for (j = 1; j < 4; j++) ............................. Statement ............................. How many times the above nested loop will iterate? - Computer Applications

Advertisements
Advertisements

Question

Given: for (i = 0; i < 4; i++)
                for (j = 1; j < 4; j++)
                .............................
                 Statement
                .............................

How many times the above nested loop will iterate?

Options

  • 12 times

  • 8 times

  • 4 times

  • 16 times

MCQ

Solution

12 times

Explanation:

4 (outer loop iterations) ×3 (inner loop iterations) = 12 total iterations.

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.1: Nested Loop - EXERCISES [Page 145]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.1 Nested Loop
EXERCISES | Q I. 4. | Page 145
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×