回 帖 发 新 帖 刷新版面

主题:[原创]发个有趣的程序

运行后注意看输出结果和源代码

#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);
}

回复列表 (共12个回复)

11 楼

说明一下,这不是我写的,不要让我解释^_^
有兴趣的可以编译运行试试,呵呵,我还藏个小秘密没说,编译运行就知道了.

12 楼

什么小秘密阿 ,我没有看出来,还望明示!

我来回复

您尚未登录,请登录后再回复。点此登录或注册