单选题 有以下结构体说明、变量定义和赋值语句
struct STD
{ char name[10];
int age;
char sex;
} s[5],*ps;
ps=&s[0];
则以下scanf函数调用语句有错误的是______。
  • A.scantf("%s", s[0].name);
  • B.scanf("%d", &s[0].age);
  • C.scanf("%c", &(ps->sex));
  • D.scanf("%d", ps->age);
【正确答案】 D
【答案解析】[解析] ps->age不是地址,不能用于scanf函数中。所以选择D。