I need to explain for the MACRO define and if else conditions.
When I using the below function I get CHANGE value to 5
#include <stdio.h>
#define CHANGE var
int var;
int main()
{
var = 5;
printf("%d",CHANGE);
}
Output: 5
But if I use like this:
#include <stdio.h>
#define CHANGABLE_VALUE var
int var;
int main()
{
var = 5;
#if CHANGABLE_VALUE == 5
printf("%d",CHANGABLE_VALUE);
#else
printf("There is no value");
#endif
}
Output: There is no value
Why the #if statements not working ?