ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers

Official Class 10 Computer Applications Revision Material: ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers

Explore reliable concept summaries and revision materials through the ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers. Tailored for Class 10 learners, utilizing these notes for Computer Applications Chapter 06 Iterations ensures thorough preparation and strengthens core academic definitions before final evaluations.

Chapter-wise Concept Summaries: Chapter 06 Iterations

Access the complete concept summary PDF for Chapter 06 Iterations below. Regular review of these targeted notes builds familiarity with complex Class 10 Computer Applications themes and helps secure higher marks in final school evaluations.

These ICSE Class 10 Computer Applications notes on Iterations cover key terms with 26 solved questions. They explain for, while and do while loops, entry-controlled and exit-controlled loops, break and continue, nested loops and scope of variables, with output tracing, loop conversion and pattern programs.

Important Terms and Definitions

1. When a set of instructions in a program are executed repeatedly, the process is referred as Iteration.

2. Iteration statement allows a set of instructions to be performed again and again, certain number of specified times.

3. Iterative statement spares a programmer from writing the same codes over and over again.

4. In a program, a block of iterative statements is called a Loop.

5. In a loop, flow of execution is controlled in such a manner that it loops back to the starting statement of a block, a number of times as per instruction given in the program.

6. A loop executes repeatedly until a given condition is fulfilled.

7. Loops are constructed by using one of the three statements: (i) while, (ii) do while, (iii) for.

8. The body of the loop contains statements which are to be repeatedly executed.

9. Usually, a loop has the following four parts:
(i) Initialization of the control variable (one or more),
(ii) Test expression,
(iii) Update expression (or variable, one or more),
and (iv) Body of the loop.

10. As long as the specified loop control condition remains true, the operation process of executing the loop body continues.

11. At the start, the control variable (or variables) is (are) initialized.

12. The loop is executed as long as the test expression remains satisfied (True).

13. The while and for loops are called entry-controlled loops. The entry into the loop is dependent on the value of the test expression.

14. The do while is known as exit-controlled. The exit is decided by the value of the test expression.

15. The entry-controlled loops (for and while loops) may not be executed even once.

16. The exit-controlled loop (do loop) is executed, at least once.

17. The job of the update expression(s) is to update the value of the loop variables, after each iteration.

18. Those statements which are executed again and again are enclosed within curly brackets { }, which constitutes the body of the loop.

19. A while loop may sometime be (i) a null or empty loop, or (ii) an infinite (non-terminating) loop.

20. After the loop is executed, a variable declared inside a for loop or while loop cannot be accessed. A variable declared before the loop can be accessed.

21. When a loop contains another loop within its body, it is called nested loop.

22. In a nested loop, the inner loop starts later and terminates earlier than the outer loop.

23. There are three jump statements in Java. They are (i) return, (ii) break and (iii) continue.

24. A jump statement facilitates unconditional transfer of program control.

25. To return from a method, the return statement may be used.

26. A break statement may be used in loops and switch statement. It terminates the execution of the loop, then and there and passes the control to the following statement.

27. In nested loop, break statement terminates the very statement it appears in.

28. The continue statement is used to abandon the current iteration of a loop. It causes to skip the remaining portion of the body of the loop and transfers control to the next evaluation of the test-expression for the next iteration.

29. In a loop, when the number of iteration is known a priori, for loop is suitable.

30. If the number of iterations is not pre-determined, while and do while loops are more appropriate.

31. The comma operator is used to separate the variables when a number of them appear in the initialization, as well as updatation parts. For example,
for (x = 1, y = x, sum = 0; x <= 10; x++, y++)

32. Unlike break statement, the continue statement does not shift the control out of the loop.

33. Each form of the loop may be converted into another kind.

34. In a for loop, initialization expressions, test condition and update expression may be skipped one or all.

35. A variable declared before a for or while loop can be accessed even after the statement terminates.

36. If a variable is declared within a block, it is not accessible outside it.

37. A variable which is declared in a conditional statement, is not accessible outside the statement.

38. The scope of a variable is the program area where it is accessible.

 

Questions with Answers

Question 1. In which loop, is the test condition checked before entering the loop?
Answer:
while and for loops.

 

Question 2. In which loop, is the test condition checked after coming out of the loop?
Answer:
do while loop.

 

Question 3. What are the four parts of a loop?
Answer:
(i) Initialization, (ii) Test condition, (iii) Update expression, and (iv) Body of the loop.

 

Question 4. What purpose is served by Iteration?
Answer:
It saves from writing the same code repeatedly.

 

Question 5. What are the three loop statements?
Answer:
(i) while, (ii) do while and (iii) for

 

Question 6. What is a null loop?
Answer:
Null loop has an empty body.

 

Question 7. What is an infinite loop?
Answer:
It is a loop in which iteration never stops. This is because, the test condition which controls the flow of the loop is always true. The loop continues infinite number of times.

 

Question 8. Give an example of an infinite loop.
Answer:
class infiniteLoop {
    public static void main (String args[ ]) {
        int x = 0;
        for (x = 10; x > 0; x++)
        {
            System.out.println ("The value of x =" + x);
        }
    }
}

 

Question 9. Write the output of the following code:
(i)

class LoopTest1 {
    public static void main (String args[ ]) {
        int i;
        for (i = 0; i < 50; i++)
        {
            if (i == 6)
                break;
            System.out.println (i);
        }
    }
}
(ii)
class LoopTest2 {
    public static void main (String args[ ]) {
        int i;
        for (i = 0; i < 100; i++) {
            if (i == 5)
                System.out.print (i);
        }
    }
}
(iii)
class LoopTest3 {
    public static void main (String args[ ]) {
        int i;
        for (i = 0; i < 4; i++) {
            System.out.print (i);
        }
    }
}
(iv)
class LoopTest4 {
    public static void main (String args[ ]) {
        int x, y;
        for (x = 0; x < 50; x++)
        {
            if (x == 10)
                break;
            System.out.println (x);
        }
    }
}
(v)
int i = 60;
while (true) {
    if (i <= 12)
        break;
    i = i - 12;
}
System.out.println ("i = " + i);
(vi) By a slight modification of the above program, convert it into an infinite loop. Write the output.
(vii)
class LoopTest5 {
    public static void main (String args[ ]) {
        int x = 1, y = 2;
        do {
            x *= y;
        } while (++y < 5);
        System.out.println (x);
    }
}

Answer:
(i) 0
1
2
3
4
5
(ii) 5
(iii) 0123
(iv) 0
1
2
...
9
(v) i = 12
(vi) Replace 'break' by 'continue'. The value of i stays 12 and the loop never ends, so there is no output.
(vii) 24

 

Question 10. Distinguish between break and continue statements.
Answer:
The break statement terminates the loop as a whole. The continue statement causes to skip the residual part of the loop and commence the next iteration.

 

Question 11. Explain the function of a return statement.
Answer:
It causes a method to terminate and returns a value to the calling function.

 

Question 12. State one similarity and one difference between while and do while loop.
Answer:
Both are conditional iterative statements. In while loop (being entry controlled) the condition is checked every time before entering the loop. In do while loop (being exit controlled), the test condition is checked after each execution of the loop. It is executed at least once.

 

Question 13. Explain the term for loop with an example.
Answer:
It is an iteration structure which executes some instruction or block of statement repeatedly.
Syntax of for loop:
for (initialization; test expression; update expression)
{
    // Body of the loop
}

Example:
for (i = 0; i <= 5; i++)
{
    System.out.println ("Quo Vadis Domino?");
}

 

Question 14. Explain with the help of an example the purpose of default in a switch statement.
Answer:
In a switch statement, when all cases fail, the case provided by the default is executed.
Example:
switch (ch)
{
    case 'O': System.out.println ("Odd no");
              break;
    case 'E': System.out.println ("Even no");
              break;
    default: System.out.println ("Enter O or E only");
             break;
}

 

Question 15. Explain the function of each of the following with an example: (a) break (b) continue
Answer:
(a) The break statement transfers control from the currently executing block to some other statement.
Example:
for (int i = 0; i < 400; i++)
{
    if (search == age[i])
    {
        System.out.println ("Found");
        break;   // control goes out of the loop
    }
}

(b) The continue statement skips the subsequent statements and proceeds to the next iteration of the loop.
Example:
for (int i = 1; i <= 10; i++)
{
    System.out.println ("!");
    if (i < 10)
        continue;
    System.out.println ("Good Bye");
}

Note: Good Bye will be printed only when i = 10. Printing will be skipped in other cases, but the loop will continue.

 

Question 16. Convert the following segment into equivalent for loop:
int i = 0;
while (i <= 20)
{
    System.out.print (i + " ");
    i++;
}

Answer:
for (int i = 0; i <= 20; i++)
    System.out.print (i + " ");

 

Question 17. Rewrite the following code fragment without break and continue:
while (ch != '*')
{
    if (ch == '?')
        break;
    if (ch != '\n')
        continue;
    line++;
}

Answer:
while (ch != '*' && ch != '?')
{
    if (ch == '\n')
        line++;
}

 

Question 18. Analyze the following program segment and determine how many times the body of the loop will be executed (show the working):
x = 5; y = 50;
while (x <= y)
{
    y = y / x;
    System.out.println (y);
}

Answer:
The body of the loop will be executed twice.
Working:
x = 5; y = 50; x <= y is true ... (1)
y = 50/5 = 10, so x = 5; y = 10; x <= y is true ... (2)
y = 10/5 = 2, so x = 5; y = 2; x <= y is false, the loop ends.

 

Question 19. Convert the following segment into an equivalent do loop:
int x, c;
for (x = 10, c = 20; c > 10; c = c - 2)
    x++;

Answer:
int x = 10, c = 20;
do
{
    x++;
    c = c - 2;
} while (c > 10);

 

Question 20. Name two jump statements and their use.
Answer:
(i) break: terminates the loop or switch statement in which it appears and transfers the control to the statement that follows it.
(ii) continue: skips the remaining statements of the current iteration of a loop and transfers the control to the next iteration.
(iii) return: ends a method and returns the control to the calling method.

 

Question 21. Write the equivalent for loop for the following code fragment:
int K = 20;
int i = 0, sum = 0;
while (i < K)
{
    sum += i;
    i++;
}
System.out.print (sum);

Answer:
int K = 20;
int sum = 0;
for (int i = 0; i < K; i++)
    sum += i;
System.out.println (sum);

 

Question 22. Write a program to determine all perfect numbers in the range of integers from 1 to 200. (An integer N is called a perfect number, if it is equal to the sum of all its factors x lying between 1 ≤ x < N, e.g. 6 = 1 + 2 + 3)
Answer:
public class perfectNo {
    public void displayPerfectNo ( )
    {
        for (int n = 1; n <= 200; n++)
        {
            int sum = 0;
            int x = n / 2;
            for (int y = 1; y <= x; y++)   // inner loop
            {
                if (n % y == 0)
                {
                    sum = sum + y;
                }
            }   // end of the inner loop
            if (sum == n)
            {
                System.out.println (n + " is a perfect no");
            }
        }   // end of outer loop
    }
}   // end of class

Output: the perfect numbers in this range are 6 and 28.

 

Question 23. What will be the output of the following code?
int m = 2;
int n = 15;
for (int i = 1; i < 5; i++);
    m++; --n;
System.out.println ("m = " + m);
System.out.println ("n = " + n);

Answer:
The semicolon after the for statement makes the loop body empty, so m++ and --n are executed only once.
m = 3, n = 14

 

Question 24. Analyse the following program segment and determine how many times the loop will be executed and what will be the output of the program segment?
int k = 1, i = 2;
while (++i < 6)
    k *= i;
System.out.println (k);

Answer:
3 times; output 60.

 

Question 25. Write a program to print the following:
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1

Answer:
class printTest {
    public void printPattern ( )
    {
        int i, j, k;
        for (i = 1; i <= 5; i++)
        {
            for (j = 1; j <= i; j++)
                System.out.print (j + " ");
            for (k = i - 1; k >= 1; k--)
                System.out.print (k + " ");
            System.out.println ( );
        }
    }
}

 

Question 26. (a) Write a program to find factorial of a natural number by using a do while loop.
(b) Write another program converting the 'do while' loop into a while loop in the same program.

Answer:
(a)
// Factorial by do while loop
class loopFact1 {
    public static void main (String args[ ]) {
        int x = 1, N = 10;
        long factorial = 1;
        do {
            factorial = factorial * x;
            x++;
        } while (x <= N);
        System.out.println ("Factorial of 10 = " + factorial);
    }
}

(b)
// Factorial by while loop
class loopFact2 {
    public static void main (String args[ ]) {
        int x = 1, N = 10;
        long factorial = 1;
        while (x <= N)
        {
            factorial = factorial * x;
            x++;
        }
        System.out.println ("Factorial of 10 = " + factorial);
    }
}

Output of both programs: Factorial of 10 = 3628800

Revision Notes and Key Concepts for Class 10 Computer Applications Chapter 06 Iterations

Download Chapter Summary: Class 10 Computer Applications Chapter 06 Iterations

Explore reliable chapter overviews for Chapter 06 Iterations tailored for Class 10 learners. Use these structured points to grasp difficult themes and ensure solid preparation for upcoming assessments.

Concept Clarification for Chapter 06 Iterations

Each chapter summary is structured around standard ICSE textbooks, allowing students to check their understanding and clarify complex ideas early in their revision.

Additional Study Resources for Class 10 Computer Applications

Follow up your revision by attempting the interactive online Computer Applications MCQ test and practice worksheets for this chapter to verify your mastery. All platform resources are free to access.

FAQs

Where can I download the latest PDF for ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers?

You can download the teacher prepared revision notes for ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers from StudiesToday.com. These notes are designed as per 2026-27 academic session to help Class 10 students get the best study material for Computer Applications.

Are these Computer Applications notes for Class 10 based on the 2027 board exam pattern?

Yes, our ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers include 50% competency-based questions with focus on core logic, keyword definitions, and the practical application of Computer Applications principles which is important for getting more marks in 2027 ICSE exams.

Do these Class 10 notes cover all topic-wise concepts for Computer Applications?

Yes, our ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers provide a detailed, topic wise breakdown of the chapter. Fundamental definitions, complex numerical formulas and all topics of ICSE syllabus in Class 10 is covered.

How can I use ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers for quick last-minute revision?

These notes for Computer Applications are organized into bullet points and easy-to-read charts. By using ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers, Class 10 students fast revise formulas, key definitions before the exams.

Is there any registration required to download Class 10 Computer Applications notes?

No, all study resources on StudiesToday, including ICSE Class 10 Computer Applications Chapter 06 Iterations Notes and Important Questions with Answers, are available for immediate free download. Class 10 Computer Applications study material is available in PDF and can be downloaded on mobile.