Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int p = -2, q = 5, r = 2, s;
    s = ++p && ++q || ++r;
    printf("%d, %d, %d, %d\n", p, q, r, s);
    return 0;
    }
    1. -1, 6, 2, 1
    2. Compilation Error
    3. 1, 6, 2, -1
    4. 6, 2, 1, -1
    5. None of these
Correct Option: A

-1, 6, 2, 1



Your comments will be displayed only after manual approval.