O
onkar
#include<stdio.h>
#define string(x) #x
#define replace(x) string(x)
#define var Hello
int main(int argc,char **argv){
char *str=replace(var);
printf("%s\n",str);
return 0;
}
This will print :
Hello
Ok fine , but can any one explain me how the preprocessor does it ?? In
one pass on multiple passes .The answer will be invaluabe to me.
regards,
Onkar
#define string(x) #x
#define replace(x) string(x)
#define var Hello
int main(int argc,char **argv){
char *str=replace(var);
printf("%s\n",str);
return 0;
}
This will print :
Hello
Ok fine , but can any one explain me how the preprocessor does it ?? In
one pass on multiple passes .The answer will be invaluabe to me.
regards,
Onkar