更多“void test(void) ”相关问题
  • 第1题:

    6 写出下列程序在X86 上的运行结果。

    struct mybitfields

    {

    unsigned short a : 4;

    unsigned short b : 5;

    unsigned short c : 7;

    }test

    void main(void)

    {

    int i;

    test.a=2;

    test.b=3;

    test.c=0;

    i=*((short *)&test);

    printf("%d\n",i);

    }


    正确答案:
     

  • 第2题:

    void GetMemory(char *p){p = (char *)malloc(100);}void Test(void) {char *str

    = NULL;GetMemory(str); strcpy(str, "hello world");printf(str);}请问运行 Test 函数

    会有什么样的结果?


    正确答案:
     

  • 第3题:

    6:写内存拷贝函数 原型给出 void*mymemcpy(void*dest,void*src,int count)


    正确答案:
     

  • 第4题:

    char*getmemory(void)

    { char p[]=”hello world”;

    return p;

    }

    void test(void)

    {

    char *str=null;

    str=Getmemory();

    printf(str);

    } 请问运行 Test 函数会有什么样的结果.


    正确答案:
     

  • 第5题:

    char *GetMemory(void){ char p[] = "hello world";return

    p; }void Test(void){char *str = NULL;str = GetMemory(); printf(str);}请问运行 Tes

    t 函数会有什么样的结果?


    正确答案:
     

  • 第6题:

    已知类Test中的方法method以通过Test.method方式进行操作,则method应是()。

    A.static方法

    B.重载方法

    C.void方法

    D.构造方法


    static 方法