KnowledgeBoat Logo

Output Questions for Class 10 ICSE Computer Applications

  • Java Operators

    If m = 5 and n = 2, predict the output values of m and n:

    (a) m -= n;

    (b) n = m + m/n;

    View Answer

    198 Likes


  • Java Operators

    What will be the output of the variable 'a'?

    int a=0,b=10,c=40;
    a = --b + c++ + b;
    System.out.println(" a = " + a);
    
    View Answer

    206 Likes


  • Java Operators

    Rewrite the following program segment using if-else statements instead of the ternary operator:

    String grade = (marks>=90)?"A": (marks>=80)? "B": "C";

    View Answer

    115 Likes


  • Java Operators

    Rewrite the following program segment using if-else statements instead of the ternary operator:

    net = (salary > 10000) ? salary - (8.33/100)*salary : salary - (5/100)*salary

    View Answer

    62 Likes


  • Java Operators

    Predict the output of the below Java program snippet:

    int a = 14, b = 4;  
    boolean x = (a > b) ? true : false;
    
    View Answer

    34 Likes


  • Java Operators

    If int y =10 then find int z = (++y * (y++ + 5));

    View Answer

    86 Likes


  • Java Operators

    Predict the output of the below Java program snippet:

    int c = (3<4)? 3*4:3+4;
    
    View Answer

    68 Likes


  • Java Operators

    Rewrite the following using ternary operator:

    if(a > b)
    {
        if (a > c)
            g = a;
        else
            g = c;
    }
    else if (b > c)
        g = b;
    else
        g = c;
    
    View Answer

    196 Likes


  • Java Operators

    Rewrite the following using ternary operator:

    if (x % 2 == 0)
        System.out.println("Even");
    else
        System.out.println("Odd");
    
    View Answer

    101 Likes


  • Java Operators

    Predict the output of the below Java program snippet:

    int a = 18; int b = 12;  
    boolean t = (a > 20 && b < 15)? true : false;
    
    View Answer

    38 Likes


Showing 101 - 110 of 147 Questions