Looking for authentic SEBA Class 10 Computer Science Chapter 5 (Nested Loops in C) MCQ solutions for the 2026–27 academic year? Access complete multiple-choice questions on outer and inner loop execution, pattern printing logic, loop counts, and output tracing with correct options and explanations to score top marks in your HSLC board exams.

Multiple Choice Questions (MCQs)

1. A loop defined inside the body of another loop is called a:

A) Parallel loop

B) Nested loop

C) Sequential loop

D) Infinite loop

Answer: B

2. In a nested loop, which loop executes completely first for every single iteration of the outer loop?

A) Outer loop

B) Inner loop

C) Both loops run together

D) Main function loop

Answer: B

3. If an outer loop executes 4 times and an inner loop executes 3 times, how many total times will the inner loop body run?

A) 7 times

B) 12 times

C) 1 time

D) 4 times

Answer: B

4. What is the syntax of a nested for loop in C?

A) for(…) for(…)
{
}

B) for(…)
{
for(…)
{
}
}

C) for(…)
{
}
for(…)
{
}

D) for(…)
{
while(…)
}

Answer: B

5. In pattern printing programs, what does the outer loop primarily control?

A) Number of spaces

B) Number of columns

C) Number of rows (lines)

D) Individual characters

Answer: C

6. In pattern printing programs, what does the inner loop control?

A) Number of rows

B) Number of elements printed in each line (columns)

C) Screen brightness

D) Header file declarations

Answer: B

7. Can we mix different types of loops in a nested loop in C (e.g., a while loop inside a for loop)?

A) No, both loops must be identical

B) Yes, any loop type can be nested inside another

C) Only for and do-while can be mixed

D) Only in C++

Answer: B

8. What will be the output of the following code?

for(int i = 1; i <= 2; i++)
{
for(int j = 1; j <= 2; j++)
{
printf(“%d “, i);
}
}

A) 1 2 1 2

B) 1 1 2 2

C) 2 2 1 1

D) 1 2 2 1

Answer: B

9. What will be the output of the following code?

c
for(int i = 1; i <= 2; i++)
{
for(int j = 1; j <= 2; j++)
{
printf(“%d “, j);
}
}

A) 1 1 2 2

B) 1 2 1 2

C) 2 1 2 1

D) 2 2 1 1

Answer: B

SEBA Class 10 Computer Science Chapter 5 MCQ Solutions

10. What will happen if both the outer loop and inner loop use the same control variable (e.g., i)?

A) Program runs faster

B) Compiler throws a fatal error

C) It causes logical errors or unpredictable loop counts

D) Program executes normally without issues

Answer: C

11. What will be printed by the following code segment?

c
for(int i = 1; i <= 3; i++)
{
for(int j = 1; j <= i; j++)
{
printf(” “);
}
printf(“\n”);
}

A)A 3 x 3 square of stars
B) A right-angled triangle with 3 rows

C) An inverted triangle with 3 rows

D) A single line of 6 stars

Answer: B

12. When a break statement is executed inside an inner loop, which loop does it exit?

A) Only the inner loop

B) Only the outer loop

C) Both inner and outer loops

D) Exits the main() program

Answer: A

13. What is the output of the code below?

c
int count = 0;
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 3; j++)
{
count++;
}
}
printf(“%d”, count);

A) 3

B) 6

C) 9

D) 0

Answer: C

14. What happens when the condition of the outer loop evaluates to false on the first check?

A) Inner loop executes once

B) Outer loop executes once

C) Neither loop executes

D) The compiler displays an alert

Answer: C

Class 10 Computer Science Chapter 5 MCQ Question Answer SEBA 2026-27

15. Which structure is best traversed using nested for loops?

A) Simple integer variable

B) Single dimensional array (1D array)

C) Two-dimensional array (2D array / Matrix)

D) Character constant

Answer: C

16. How many total loops are present in a 3-level nested loop structure?

A) 1

B) 2

C) 3

D) 4

Answer: C

17. What will be the output of the code segment?

c
for(int i = 3; i >= 1; i–)
{
for(int j = 1; j <= i; j++)
{
printf(“%d”, i);
}
}

A) 333221

B) 123211

C) 321321

D) 111223

Answer: A

Nested Loops in C Class 10 SEBA MCQ Notes

18. What is Floyd’s Triangle?

A) A triangle formed by stars

B) A right-angled triangle array of natural numbers

C) A rectangle of alphabets

D) A matrix with zeroes only

Answer: B

19. What will happen if you omit the increment/decrement statement in the inner while loop of a nested loop?

A) Syntax error

B) Program skips the outer loop

C) Inner loop enters an infinite execution loop

D) Program executes cleanly

Answer: C

20. What statement skips the remaining code of the current iteration and jumps directly to the next pass of that specific loop?

A) break

B) continue

C) exit

D) goto

Answer: B

SEBA Class 10 Computer Science Chapter 5 Multiple Choice Questions

21. How many stars will be printed by this nested loop?

c
for(int i = 0; i < 4; i++)
{
for(int j = 0; j < 2; j++)
{
printf(“”);
}
}

A) 4

B) 6

C) 8

D) 2

Answer: C

22. ASCII value 65 in C represents which character when printed using %c?

A) ‘a’

B) ‘A’

C) ‘0’

D) ‘#’

Answer: B

23. What will be printed by the following alphabet loop?

for(int i = 1; i <= 2; i++)
{
for(int j = 65; j < 65 + i; j++)
{
printf(“%c “, j);
}
}

A) A A B

B) A B C

C) A A

D) B A B

Answer: A

24. In an inverted right-angled star pattern (e.g., 4 stars, then 3, then 2, then 1), the inner loop condition depends on:

A) A fixed constant value

B) The outer loop control variable

C) The main() function parameters

D) sizeof(int)

Answer: B

HSLC Computer Science Chapter 5 Objective Questions

25. Why is proper indentation recommended while writing nested loops in C?

A) It is mandatory for the compiler to execute the code

B) It reduces memory usage

C) It visually distinguishes loop levels and improves code readability

D) It prevents infinite loops automatically

Answer: C

💻 Updated MCQ Guide Notice: This page features a full collection of SEBA Class 10 Computer Science Chapter 5 (Nested Loops in C) Multiple Choice Questions (MCQs) with accurate options and detailed explanations, fully updated for the 2026–27 academic session in accordance with the latest revised Assam Board (SEBA) curriculum.

💡 Master Class 10 Computer Science MCQs:

Leave a Reply

Your email address will not be published. Required fields are marked *