- Home
- Studylists
Output Questions for Class 10 ICSE Computer Applications
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 Answer100 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 Answer47 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 Answer46 Likes
Java Operators
Predict the output of the below Java program snippet:
int x = 90; char c = (x<=90)?'Z':'I';
View Answer25 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 Answer86 Likes
Java Operators
Give the output of the following expression:
a+= a++ + ++a + --a + a--; when a = 7;View Answer166 Likes
Java Operators
Rewrite the following using ternary operator:
if (p >= 4750) k = p * 5 / 100; else k = p * 10 / 100;
View Answer75 Likes
Java Operators
What is the value of y after the execution?
y+= ++y + y-- + --y; when int y=8View Answer110 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 Answer52 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 Answer245 Likes