Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int p1 = 7, p2 = 5, k;
    int p3;
    p3 = p2 = 3, k = p1 && p2;
    printf("%d\n", k);
    return 0;
    }
    1. Compilation Error
    2. 7
    3. Undefined behaviour due to order of evaluation can be different
    4. 5
    5. 1
Correct Option: E

1



Your comments will be displayed only after manual approval.