阅读背景:

关于C语言中数组不能直接赋值的原因探究

来源:互联网 
#include <stddef.h> #include <stdio.h> typedef struct{ int s1; int s2; }Struct; int test() { return 0; } int test2() { return 0; } int main() { int array[3] = {1,2,3}; Struct stru = {1,2}; Struct sru2 = stru; int a = 5; void* p = NULL; p = array; printf("%x\n", p); p = test; printf("%x\n", p); p = &stru; printf("%x\n", p); p = &a; printf("%x\n", p); return 0; } #include <stddef.h> #include <stdio.h> typedef st



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: