Question 43)
If the following code is executed then what is the value of the variable HI?
main()
{ int HI, L, B, L = B = 2, HI = ( L == B)? 1:0;}
A
0
B)
2
C)
1
D)
Run time error
Answers
Answered by
0
Answer:
c) 1
Explanation:
given: L=B= 2
And, Hl=(L== B)? 1 : 0;
This means that if L is equal to B , 1 will be stored in Hl else 0 will be stored in Hl.
Therefore, the answer is Hl = 1
Hence, option C is correct
Similar questions