Hi
I have a code:
In this assert macro will call only if x is 0.Code:#include<stdio.h> #define assert(cond) if(!(cond))\ printf("assertion failed for condition %s\n",#cond) main() { int x=100; if(x == 0) assert(x<100); else printf("No assert call\n"); getchar(); return 0; }
So normally as first if condition fail, it should come in else and print "No assert Call".
But it is not coming in else part and directly comes to getchar().
Can any body help why this happen?
Thanks