#define AND &&
#define ARRANGE (a>25 AND a<50)
main()
{
    int a = 30;
    if (ARRANGE)
        printf("within range");
    else
        printf("out of range");
}

What is the output?

I don't know, enlighten me.

With in range or out of range it doesn't matter.

your program works ok with my compiler (VC++ 6.0). what compiler and os are you using. did you include stdio.h header file? And after changing the value of the "a" variable don't forget to recompile your program.

Don't you have a compiler at your place...go and check it there...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.