Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int a = 4, b = 3;
    int c = a && b = 4;
    printf("%d\n", c);
    }
    1. 3
    2. 4
    3. Runtime Error
    4. Compilation Error
    5. None of these
Correct Option: D

Compilation Error

main.c: In function ‘main’:
main.c:5:24: error: lvalue required as left operand of assignment
int c = a && b = 4;



Your comments will be displayed only after manual approval.