MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
On applying Left shift operator,
1.
On applying Left shift operator,
A.
32
B.
31
C.
33
D.
1
E.
None of these
Answer» C. 33
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
With x = 0, which of the following are legal lines of Java code for changing the value of x to 1? 1. x++; 2. x = x + 1; 3. x += 1; 4. x =+ 1;
On applying Left shift operator, < 32 31 33 1 None of these
What is the output of this program?public class Output { public static void main(String args[]) { int p = 5; int q = 7; int r; int s; r = ++q; s = p++; r++; q++; ++p; System.out.println(p + " " + q + " " + r); } }
What is the output of this program?public class RightShift_Operator { public static void main(String args[]) { int a; a = 100; a = a >> 1; System.out.println(a); } }
What is the output of this program?public class LeftShift_Operator { public static void main(String args[]) { byte A = 65; int i; byte b; i = A << 2; b = (byte) (A << 2); System.out.print(i + " " + b); } }
Which of the following operators can operate on a boolean variable? 1. && 2. == 3. ?: 4. +=
What is the output of this program?public class Output { public static void main(String args[]) { int p = 5; int q = 6; int r = 7; p |= 4; q >>= 1; r <<= 1; p ^= r; System.out.println(p + " " + q + " " + r); } }
What is the output of this program?public class ternary_operator_Example { public static void main(String args[]) { int a = 5; int b = ~ a; int c; c = a > b ? a : b; System.out.print(c); } }
What is the output of this program?public class bool_operator_Example { public static void main(String args[]) { boolean p = true; boolean q = !true; boolean r = p | q; boolean s = p & q; boolean z = s ? q : r; System.out.println(s + " " + z); } }
What is the output of this program?public class Relational_operator_Example { public static void main(String args[]) { int num1 = 7; int num2 = 6; System.out.print(num1 > num2); } }
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies