单选题
C语言
题号 #2273276
有以下程序:
#include <stdio.h>
main( )
{ struct node{int n; struct node*next;} *P;
struct node x[3]={{2,x+1),{4,x+2},{6,NULL}};
P= X;
printf("%d,",p->n);
printf("%d\n",p->next->n);
}
程序运行后的输出结果是( )。
参考答案
B
答案解析
略。
你可能感兴趣的试题
A.2
B.4
C.6
D.8
A.C程序函数中定义的赋有初值的静态变量,每调用一次函数,赋一次初值
B.在同一函数中,各复合语句内可以定义变量,其作用域仅限本复合语句内
C.C程序函数中定义的自动变量,系统不自动赋确定的初值
D.C程序函数的性能不可以说明为static型变量