Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = 2;
    if (k++ && (k == 3))
    {
    printf("Yes\n");
    }
    else
    {
    printf("No\n");
    }
    }
    1. No
    2. Compilation Error
    3. 3
    4. Yes
    5. None of these
Correct Option: D

Yes



Your comments will be displayed only after manual approval.