Questions 11: What will be the output of the following pseudocode?
Integer a, b, c
Set a = 4, b = 4, c = 4
if (a & (b ^ b) & c)
a = a >> 1
End if
Print a + b + c
Answer: d) 12
Questions 12: What will be the output of the following pseudocode for a = 10, b = 11?
Integer funn(Integer a, Integer b)
if(0)
return a - b - funn(-7, -1)
End if
a = a + a + a + a
return a
End function funn()
Answer: a) 40
Questions 13: What will be the output of the following pseudocode for a = 5, b = 1?
Integer funn(Integer a, Integer b)
if(b + a || a - b) && (b > a) && 1)
a = a+b+b-2
return 3-a
Else
return a-b+1
End if
return a+b
End function fun()
Answer: b) 5
Questions 14: What will be the output of the following pseudocode for a = 5, b = 1?
Integer funn(Integer a, Integer b)
if((b mod a && a mod b) || (a ^ b > a))
a=a^b
Else
return a-b
End if
return a+b
End function funn()
Answer: b) 5
Questions 15: What will be the output of the following pseudocode for a = 4, b = 8?
Integer funn(Integer a, Integer b)
if(a > b)
b = b ^ a
End if
if(b > a)
a = a ^ b
End if
return a + b
End function funn()
Answer: b) 20
Questions 16: What will be the output of the following pseudocode?
Integer x
Set x = 2
if(x is EQUAL TO 1)
if(x IS EQUAL TO 0)
Print "A"
else
Print "B"
end if
else
Print "C"
end if
Answer: b) C