A warrior never surrenders, A warrior never quits..


Thursday, June 9, 2011

When pointer to functions fascinated me...

Some time back I was fascinated by pointer to function concept. Not only it gives the flexibility of CallBack, its more faster nevertheless. But instead of writing plain code I thought to write a code that looks different. Here it is...

void _(int *_o,int o_){o_<7?printf("%c",o_[_o]),o_++,_(_o,o_):printf("\n");}
void o_o(void (*_)(int*,int),int *_0,int __){_(_0,__);}
main(){int _O_[]={83,104,117,98,104,97,0x6d},_i_=0;
void (*_o_)(int*,int)=&_;
void (*_0_)(void(*__)(int*,int),int*,int)=&o_o;
_0_(_o_,_O_,_i_);}


All it does is print my name.

No comments: