Saturday, December 30, 2006

without "" in printf

can u print any string wthout using " " in printf function?

without using " " anywhere in the program

#define str(a) #a

printf(str(Hi there));

I haven't figured out how this happens , but happens for sure!

1 comment:

Karthik Kumar Viswanathan said...

Hi!

Nice blog. Tracked you from the bitwise oage.

Anyway,

#a happens to be a macro, and it stringizes Hello to "Hello", which is what the compiler compiles.