Q. What will be the output of the following C code?

Code:
#include <stdio.h>

int main()
{
    int a=0;
    
    a=5||2|1;
    printf("%d",a);
    
    return 0;
}
  • (A) 1
  • (B) 7
  • (C) 8
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
210
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Kanak Sharma
Publisher
πŸ“ˆ
82%
Success Rate