Home » C Programming » Preprocessors » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    #define Winter
    int main()
    {
    #ifdef Winter
    printf("Winter\t");
    #undef Winter
    #endif
    #ifdef Winter
    printf("Summer\t");
    #endif
    }
    1. Garbage value
    2. Summer
    3. Winter
    4. Compilation Error
    5. None of these
Correct Option: C

Winter



Your comments will be displayed only after manual approval.