निम्नलिखित का आउटपुट क्या होगा छद्म कोड, जहां संचालन और प्रतिनिधित्व करते हैं?
What will be the output of the following pseudo code, where & represent And operation ?
Integer a, b, c
Set b = 5, a = 1
c = a & b
Print c A
1
B
3
C
5
D
7
Explanation
Sure!
a = 1(binary0001),b = 5(binary0101).- The AND operation (
&) compares each bit:0001 & 0101 = 0001(which is1).
So, the output is 1.
Answer: (A) 1.
Correct Answer: A) 1