快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

指针变量初始化 内存中怎么做的

    R.Ihskaka
    新手上路
    因为学校的机器没有linux,所以我用了xp+vc6,文件名为test.c

    代码是在Release模式下debug的,因为DEBUG模式会对环境有依赖.

    这个是源码:

    #include<stdio.h>
    #define SUCCESS 1
    #define FAILURE 0
    void main()
    {
    char *lpTest = "ABCD";
    printf("The String is: %s n ",lpTest);
    *(lpTest+1) = 'X';
    printf("The String is: %s n ",lpTest);
    }


    发表于: 2005-01-15 11:35


    在下新人,也想参与下讨论,哪里说的不对,请各位包涵并指出

    因为学校的机器没有linux,所以我用了xp+vc6,文件名为test.c

    代码是在Release模式下debug的,因为DEBUG模式会对环境有依赖.

    这个是源码:

    #include<stdio.h>
    #define SUCCESS 1
    #define FAILURE 0
    void main()
    {
    char *lpTest = "ABCD";
    printf("The String is: %s n ",lpTest);
    *(lpTest+1) = 'X';
    printf("The String is: %s n ",lpTest);
    }


    这是由vC6的Debug的汇编代码,其中

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论