Q. What does the following code do?
Code:
#include <stdio.h>
int main() {
int a = 1, b = 2;
printf("%d", a && b);
return 0;
}
β
Correct Answer: (A)
1
Explanation: a && b evaluates to true (1) since both are non-zero.