Question
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);
}
}
What is the output of this program?
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);
}
}
Answer: Option A
Was this answer helpful ?
And operator produces 1 bit if both operand are 1. Or operator produces 1 bit if any bit of the two
operands in 1.
output:
$ javac bitwise_operator.java
$ java bitwise_operator
7 2
Was this answer helpful ?
More Questions on This Topic :
Question 7.
Which of these statements are incorrect?
....
Question 8.
Which of these statements are incorrect?
....
Submit Solution