int a = 1, b = 2; int c = a | b; int d = a || b;Ans: value of c will be 3 and d will be 1
c = (binary 01) OR (binary 10) = (binary 11) = 3 d = 1 (Logical OR) 2 = (1 is not FALSE) Logical OR (2 is not FALSE) = (TRUE) Logical OR (TRUE) = TRUE = 1
About our authors: Team EQA
You have viewed 1 page out of 252. Your C learning is 0.00% complete. Login to check your learning progress.