Professional Documents
Culture Documents
Computer Output Based Questions Set 1
Computer Output Based Questions Set 1
SET: 1
int x=20;
String sup =
(x < 15)? "small" : (x < 22)? "tiny": "huge";
System.out.println(sup);
int x= 0;
int y= 0;
for (int z = 0; z < 5; zt4)
System.out.println(x +" y
Q.8. What will be the
class Bitwise output of the
program?
public static void
main(String [l args)
int x 11 & 9;
=
inty = x^ 3;
System.out.println( y | 12 );
Q.9. What will be the of the
class Test output program?
static int s;
public static void
main(String [l args)
Test p =
new Test();
p.start();
System.out.println(s);
void start0
int x = 7;
twice(x);
System.out.print(x +" ");
void twice(int x)
X = x*2;
S = X;
i se j
int i = 4, j = 2;
leftshift(, j);