问题
单项选择题
有以下说明和定义语句:
struct student
int age; char num[8] ;;
struct student stu [3] = 20, "200401" , 21, "200402" , 19, "200403" ;
stract student * p = stu;
以下选项中引用结构体变量成员的表达错误的是( )。
A.(p++) ->num
B.p- >num
C.( *p).num
D.stu[3].age
答案
参考答案:D
解析: 结构体变量的引用有三种形式:结构体变量.成员名;(*p).成员名;P->,成员名。所以选项A),B),C)都是正确的。