C,
pasted
on Feb 22:
|
#define p(c) putchar(c)
void pr(char *x, int f)
{
char *y;
for(y=x;*y;y++)
{
if(!f){p(*y);continue;}
if(*y==0x58) {p(34);pr(x,0);p(34);}
else if(*y==0x40)p(10);
else p(*y);
}
}
char *this="#define p(c) putchar(c)@void pr(char *x, int f)@{@ char *y;@ for(y=x;*y;y++)@ {@ if(!f){p(*y);continue;}@ if(*y==0x58) {p(34);pr(x,0);p(34);}@ else if(*y==0x40)p(10);@ else p(*y);@ }@}@char *this=X;@@void main(){pr(this,1);}@";
void main(){pr(this,1);}
|
Output:
|
#define p(c) putchar(c)
void pr(char *x, int f)
{
char *y;
for(y=x;*y;y++)
{
if(!f){p(*y);continue;}
if(*y==0x58) {p(34);pr(x,0);p(34);}
else if(*y==0x40)p(10);
else p(*y);
}
}
char *this="#define p(c) putchar(c)@void pr(char *x, int f)@{@ char *y;@ for(y=x;*y;y++)@ {@ if(!f){p(*y);continue;}@ if(*y==0x58) {p(34);pr(x,0);p(34);}@ else if(*y==0x40)p(10);@ else p(*y);@ }@}@char *this=X;@@void main(){pr(this,1);}@";
void main(){pr(this,1);}
|
|