KnowledgeBoat Logo

Output Questions for Class 10 ICSE Computer Applications

  • Java Iterative Stmts

    Predict the Output of the following Java program:

    class dkl
    {
    public static void main(String args[])
    {
    int i;
    for(i = -1;i<10;i++)
    {
    System.out.println(++i);
    } 
    } 
    }
    

  • Java Iterative Stmts

    Give the output of the snippet:

    int p = 9;
    while (p<=15)
    {
    p++;
    if(p== 10)
    continue;
    System.out.println(p);
    }
    

  • Java Iterative Stmts

    Give the output of the snippet:

    int a = 3;
    while (a<=10)
    {
    a++;
    if(a== 5)
    continue;
    System.out.println(a);
    }
    

  • Java Iterative Stmts

    Give the output of the following program segment and also mention the number of times the loop is executed:

    int a,b;
    for (a = 6, b = 4; a <= 24; a = a + 6)
    {
        if (a%b == 0)
        break;
    }
    System.out.println(a);
    

  • Java Iterative Stmts

    Write the output of the following program code:

    char ch ;
    int x=97;
    do
    {
        ch=(char)x;
        System.out.print(ch + " " );
        if(x%10 == 0)
        break;
        ++x;
    } while(x<=100);
    

  • Java Iterative Stmts

    Give the output of the following program segment and mention how many times the loop will execute:

    int k;
    for ( k = 5 ; k < = 20 ; k + = 7 )
    if ( k% 6==0 )
    continue;
    System.out.println(k);
    
    View Answer

    18 Likes


  • Java Iterative Stmts

    Give the output of the following program segment and also mention the number of times the loop is executed:

    int x, y;
    for (x = 9, y = 4; x <= 45; x+=9) {
        if (x % y == 0)
            break;
    }
    System.out.println(x);
    

Showing 141 - 147 of 147 Questions