πŸ“Š C Programming
Q. What does the following code do?
Code:
#include <stdio.h>
int main() {
    int a = 1, b = 2;
    printf("%d", a && b);
    return 0;
}
  • (A) 1
  • (B) 2
  • (C) 0
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1

Explanation: a && b evaluates to true (1) since both are non-zero.

Explanation by: Mr. Dubey
a && b evaluates to true (1) since both are non-zero.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
70
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
98%
Success Rate