samedi 27 juin 2015

Output of the following code- macros in c

For the following code I am getting output as- Geeks.

#include <stdio.h>
#define ISEQUAL(X, Y) X == Y
int main()
{
    #if ISEQUAL(X, 0)
        printf("Geeks");
    #else
        printf("Quiz");
    #endif
    return 0;
}

Explain the reason for such output.

Aucun commentaire:

Enregistrer un commentaire