KnowledgeBoat Logo

Output Questions for Class 10 ICSE Computer Applications

  • Java Operators

    Rewrite the following using ternary operator:

    if (bill > 10000)
        discount=bill*10.0/100;
    else
        discount=bill*5.0/100;
    
    View Answer

    100 Likes


  • Java Operators

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

    c = (x >= 'A' && x<= 'Z') ? "Upper Case Letter" : "Lower Case Letter";

    View Answer

    47 Likes


  • Java Operators

    Predict the output of the below Java program snippet:

    c = (val + 550 < 1700)? 200: 400;  
    

    if: (a) val = 1000         (b) val = 1500

    View Answer

    46 Likes


  • Java Operators

    Predict the output of the below Java program snippet:

    int x = 90;  
    char c = (x<=90)?'Z':'I';
    
    View Answer

    25 Likes


  • Java Operators

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

    commission = (sale > 5000) ? sale*10/100 : 0;

    View Answer

    86 Likes


  • Java Operators

    Give the output of the following expression:
    a+= a++ + ++a + --a + a--; when a = 7;

    View Answer

    165 Likes


  • Java Operators

    Rewrite the following using ternary operator:

    if (p >= 4750)
        k = p * 5 / 100;
    else
        k = p * 10 / 100;
    
    View Answer

    74 Likes


  • Java Operators

    What is the value of y after the execution?
    y+= ++y + y-- + --y; when int y=8

    View Answer

    109 Likes


  • Java Operators

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

    s = (a + b < c || a + c <= b || b + c <= a) ? "Triangle is not possible": "Triangle is possible";

    View Answer

    52 Likes


  • Java Operators

    What will be the output of the following code?

    int k=5,j=9;
    k+= k++ - ++j + k;
    System.out.println("k="+k);
    System.out.println("j="+j);
    
    View Answer

    245 Likes


Showing 111 - 120 of 147 Questions