Home / Programming MCQs / JAVA MCQs / Question

R

Rajeev Malhotra • 3.97K Points
Extraordinary

Q. What is the output of this program?

Code:
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);
        } 
    }
(A) 11 3 14
(B) 10 10 10
(C) 11 2 15
(D) 11 2 14

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.