What will be the output of the following code? [code]~xor(3476,1234)[/code]

Phương Quyên

New member
What will be the output of the following code?
Code:
~xor(3476,1234)
A. 1
B. 0
C. Error
D. NaN
 
Answer: a
Explanation: The output of xor(3476,1234) will be 0 since xor() returns a logical 1 iff one of the argument is 0. Since we have added the not operator before, the output will be 1.
Output: 1
 

Tìm kiếm

Back
Top