Multiple choice

Nested loops are used for which of the following purposes in 'C'?

  1. To execute value of control variable multiple times.

  2. To read value for one-dimensional array statement.

  3. To execute value of outer variable to specified number of times in the inner loop.

  4. To get sum and average of 'N' numbers.

  5. To compare two strings.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct option as in the nested loop statement inner loop is repeated specified number of times for each value of control variable in the outer loop.