Question On Computer
Question On Computer
*
(c)/ (d)
(ii) (a) double (b) int
int result =
(++ z) + y + (++ x) + (z ++)
(a) 11 (b) 12
(c) 10 (d) 9
(ii) int f = 10, m = 9;
String e =
(m% f = =9)?"YES": "NO;"
System.out.print(e);
(a) YES (b) NO
(c) YESN0 (d NOYES
V = X + -- z + y++ + y
(ICSE 2019)
12. What is the value of y after evaluating the expression?
y+++y +y+--Y; when inty =8 (ICSE 2018)
13. What is the value of xl if x = 5?
xl = ++X - X + + - - X
(ICSE 2017)
14. Give the output
a+ a+++++a + --a +a--; when a = 7
(ICSE 2016)
15. If int y =10, then find
*
int (++y (y++ + 5);
z=
(ICSE 2015)
16. Give the output
public static void main ()
{int a = 5;
a t+;
System.out.printin (a);
a-=(a--(--a);
System.out.println (a); (ICSE 2014)
17.What will be the result stored in x?
intx = 4; x+ = (X++) +(++X) + X; (ICSE 2012)
18. What will be the output of the following?
int k = 5; j = 9;
k+=k++-++)+k;
System.out.println ("k=" + k);
System.out.printin ("j = " + j);
(ICSE 2011)
19. What is the result stored in x?
int x = 5; X = X++ * 2 + 3 * - - X;
(ICSE 2010)
20. If the value of basic = 1500, what will be the value of
tax after the following statement is executed?
tax basic >1200? 200: 100; (ICSE 2019)
21.Convert the following into ternary operator:
if(bill> 10000)
discount = bill*10.0/100.0;
else
discount = bill* 5.0/100.0; (ICSE 2018)
22. Rewrite the following using ternary operator:
if (x% 2 == 0)
System.out.print ("EVEN");
else
System.out.print ("ODD"); (ICSE 2016)
23. Evaluate the value of a. If value of p = 5, q = 19
int a = (q - p) > (p - q)? (q - p) : (p- q);
(ICSE 2015)
24. Rewrite thefollowing ternary into if-else:
String grade = (marks >= 90)? "A" : (marks>=80)?
"B": "C"; (ICSE 2014)
25.Rewrite thefollowing into if-else:
comm = (sale> 15000)?sale * 5.0/100.0 0;
(ICSE 2013)
26. What are the values of x and y?
inta 63, b = 36;
boolean x = (a > b)? true : false;
int y = (a < b)? a : b;
(ICSE 2012)
27. Rewrite using ternary operator
if (income <=10000)
tax = 0;
else
tax = 12;
(ICSE 2007)
28.If a = 5, b 9;
Calculate the value of a + =(a ++) - (++b) + a;
(ICSE 2008)
Oriented
Programming.
and binary operator.
30. Write a difference between unary (ICSE 2019)
data in
short and float type
31. Write the memory capacity of (ICSE 2019)
bytes.
32. Identify and name the token:
(iv) {} (ICSE 2019)
) public (ii) 'a (ii)==
in Java?
33. What are the various types of errors
(ICSE 2019)
(ii) a * (++b)% c
(ICSE 2006)
segment; when :
64. Find the output of the following program
(i) val = 550;
int val, sum, x = 550;