Q. What will be the output of the following Java program?

Code:
class bitwise_operator 
{
    public static void main(String args[]) 
    {    
         int a = 3;
         int b = 6;
   int c = a | b;
         int d = a & b;             
         System.out.println(c + " "  + d);
    } 
}
  • (A) 7 2
  • (B) 1 & 4
  • (C) 7 5
  • (D) 5 2
πŸ’¬ Discuss
βœ… Correct Answer: (A) 7 2

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
129
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
95%
Success Rate