Tayyari Karo Open the app

Matric Computer Science: Data and Repetition, questions with answers

Practise 22 real Federal Board questions on Data and Repetition from 2023 to 2025. See the answer and explanation as soon as you answer.

22real questions
5multiple choice
3exam sessions

About Data and Repetition in Matric Computer Science

Data and Repetition is one of the 9 main chapters in our Federal Board Matric Computer Science question bank (10th class), and about 7% of its real questions come from it. Tayyari Karo has 22 real questions on this chapter from 2023 to 2025; 5 are multiple choice and marked instantly, and the rest are short and long questions with a model answer. By difficulty: 13 medium, 9 easy.

Work through the questions below, then open the explanation for each one. Redo the ones you missed a few days later.

Try 8 real questions

These are real past-paper questions. Think of your answer first, then open the explanation.

2025 2nd Annual · 10th · Data and Repetition

Which loop executes at least once?

  1. for loop
  2. while loop
  3. do-while loop
  4. switch
Show answer and explanation

Answer: C. do-while loop

A do-while loop checks its condition after the body runs, so the body always executes at least once.

2025 2nd Annual · 10th · Data and Repetition

Which loop is most efficient for iterating a known number of times?

  1. do-while loop
  2. goto statement
  3. while loop
  4. for loop
Show answer and explanation

Answer: D. for loop

The for loop's structure (init; condition; update) is built exactly for a known/fixed number of iterations.

2024 Annual · 10th · Data and Repetition

Which loop executes at least once?

  1. for loop
  2. while loop
  3. do-while loop
  4. switch
Show answer and explanation

Answer: C. do-while loop

A do-while loop tests its condition after executing the body, so the body always runs at least once.

2024 Annual · 10th · Data and Repetition

Which loop is most efficient for iterating a known number of times?

  1. do-while loop
  2. goto statement
  3. while loop
  4. for loop
Show answer and explanation

Answer: D. for loop

The for loop keeps initialisation, condition and update together, making it the natural choice when the number of iterations is already known.

2023 Annual · 10th · Data and Repetition

The loop within another loop is called:

  1. FOR
  2. Nested
  3. WHILE
  4. DO-WHILE
Show answer and explanation

Answer: B. Nested

A loop placed inside the body of another loop is called a nested loop, regardless of the loop type used.

2025 2nd Annual · 10th · Data and Repetition

What is a loop structure? Give an example.

Show model answer

A loop structure is a control structure that repeats a set of statements multiple times as long as a given condition holds (or for a set number of times), instead of writing the same statements repeatedly.
Example: for(i=1;i<=5;i++) printf("%d",i); prints 1 2 3 4 5.

2025 2nd Annual · 10th · Data and Repetition

Write down the purpose and syntax of do-while loop.

Show model answer

Purpose: executes the loop body first, then checks the condition — so the body always runs at least once.
Syntax:do {
statement(s);
} while (condition);

2024 Annual · 10th · Data and Repetition

Rewrite the following for loop by using while loop:
int k;
for (k=25;k>0;k=k-3)
printf("\n%d",k);

Show model answer

int k = 25;
while (k > 0) {
printf("\n%d", k);
k = k - 3;
}

Sessions with Data and Repetition questions

SessionQuestions
2025 2nd Annual11
2024 Annual7
2023 Annual4

Common questions

What does the Data and Repetition chapter cover on this page?

22 real Federal Board (FBISE) Computer Science questions on Data and Repetition from 2023 to 2025, for 10th class. Each one shows the session it came from.

Are the answers official?

No. We could not find an official FBISE marking scheme for these papers, so the answers and explanations are written by Tayyari Karo for practice. Check anything important with your teacher or textbook.

Is it free?

You can start free with no signup. A small set of papers per subject is free, and Premium unlocks the full question bank.

Other Computer Science chapters

All Matric Computer Science questions

Computer Science at other levels

Ready to start?

Free to start. No signup needed to try the questions.

Open Tayyari Karo