Java Programming - Operators and Assignments - Discussion
Discussion Forum : Operators and Assignments - Pointing out the correct statements (Q.No. 3)
3.
Which two statements are equivalent?
- 16*4
- 16>>2
- 16/2^2
- 16>>>2
Answer: Option
Explanation:
(2) is correct. 16 >> 2 = 4
(4) is correct. 16 >>> 2 = 4
(1) is wrong. 16 * 4 = 64
(3) is wrong. 16/2 ^ 2 = 10
Discussion:
27 comments Page 3 of 3.
Santhosh said:
9 years ago
2<<3 what is the answer, can you explain me?
Neethu said:
8 years ago
16/2^2.
16/2=8->1000.
1000^0010=1010~=10.
16/2=8->1000.
1000^0010=1010~=10.
Sneha said:
1 decade ago
I also wanna know the same thing..
Hareram said:
1 decade ago
Please explain it detail how. ?
Sumit said:
10 years ago
Hi, how this is possible?
Gowthami said:
8 years ago
Answer is 16.
Rohan said:
1 decade ago
Thanks Jose.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers