主题:[原创]发个有趣的程序
运行后注意看输出结果和源代码
#include<stdio.h>
main()
{
char s1[]=";| char s2[]=~#include<stdio.h>$main()${$ char s1[]=~;| char *p;| for(p=s2;*p;p++)if(*p=='$')*p=10;| printf(s2);putchar(34);printf(s1);putchar(34);| for(p=s1;*p;p++)| {| if(*p==124)*p=10;| if(*p==126)*p=34;| }| printf(s1);|}| ";
char s2[]="#include<stdio.h>$main()${$ char s1[]=";
char *p;
for(p=s2;*p;p++)if(*p=='$')*p=10;
printf(s2);putchar(34);printf(s1);putchar(34);
for(p=s1;*p;p++)
{
if(*p==124)*p=10;
if(*p==126)*p=34;
}
printf(s1);
}
#include<stdio.h>
main()
{
char s1[]=";| char s2[]=~#include<stdio.h>$main()${$ char s1[]=~;| char *p;| for(p=s2;*p;p++)if(*p=='$')*p=10;| printf(s2);putchar(34);printf(s1);putchar(34);| for(p=s1;*p;p++)| {| if(*p==124)*p=10;| if(*p==126)*p=34;| }| printf(s1);|}| ";
char s2[]="#include<stdio.h>$main()${$ char s1[]=";
char *p;
for(p=s2;*p;p++)if(*p=='$')*p=10;
printf(s2);putchar(34);printf(s1);putchar(34);
for(p=s1;*p;p++)
{
if(*p==124)*p=10;
if(*p==126)*p=34;
}
printf(s1);
}