Home » JAVA Programming » Basic Operators » Question
  1. 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);
    }
    }
    1. 11 3 14
    2. 10 10 10
    3. 11 2 15
    4. 11 2 14
    5. 2 3 14
Correct Option: A

Output: 11 3 14



Your comments will be displayed only after manual approval.