Home » C Programming » Operators » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int num = 12;
    if (num == num--)
    printf("TRUE 1\t");
    num = 10;
    if (num == --num)
    printf("TRUE 2\t");
    }
    1. TRUE 2
    2. TRUE 1
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: A

This is a sequence point problem and hence the result will be implementation dependent.



Your comments will be displayed only after manual approval.