Hello all,
I just want to see the functioning of preprocessor in simple program but its not working accordingly. Please let me know where I am making mistake
But each time output isCode:#include<stdio.h> #include<conio.h> void main() { int x ; printf("Enter the number either 1 or 2\n"); scanf("%d", &x); #ifdef x 1 printf("Entered number is 1"); #else printf("Entered number is 2"); #endif }
Entered number is 2.
Thanks