R

Rajeev Malhotra • 3.97K Points
Extraordinary

Q. What is the output of this program?

Code:
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);
        } 
    }
  • (A) 250 2
  • (B) 260 2
  • (C) 260 4
  • (D) 230 6
  • Correct Answer - Option(C)
  • Views: 226
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics