首页/ 题库 / [单选题]若有下列说明和语句,则对结构体变量st中的答案

若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。 Struct stu { int i; int name; }st,*p; p=&st;

单选题
2022-06-13 13:41
A、st.i
B、*p.i
C、(*p).i
D、p->i
查看答案

正确答案
B

试题解析
解析: 本题主要考查结构指针:p=&st,访问结构体的成员,可以通过结构变量访问,即st.i,也可以用等价的指针形式,即(*p).i和p->i。

标签:
感兴趣题目
已知有如下结构体: struct sk { int a; float b; }data,*p; 若有P=&data,则对data的成员a引用正确的是( )。
已知有结构体: struct sk { int a; float b; }data,*p; 若有p=&data,则对data的成员a的正确引用是( )。
已知有结构体:struct sk{ iht a;float b;)data,*p;若有p=&data,则对data的成员a的正确引用是( )。
已知有结构体: struct sk { int a; float b; }data,*p; 若有p=&data, 则对data的成员a的正确引用是( )。
有以下说明和定义语句 struct student { int age; char num[8];}; struct student stu[3]={{20,"200401"},{21,"200402"},(19,"200403"}}; struct student*p=stu; 以下选项中引用结构体变量成员的表达式错误的是______。
有以下说明和定义语句struct student{ int age;char num {8};};struct student stu[3]={{20,“200401”},{21,“200402”),{19,“200403”}};struct student *p=stu; 以下选项中引用结构体变量成员的表达式错误的是
有以下说明和定义语句:struct student{int age; char num[8] ;};struct student stu [3] = { { 20, "200401" } , {21, "200402" } , {19, "200403" } };stract student * p = stu;以下选项中引用结构体变量成员的表达错误的是( )。
有以下说明和定义语句 struct student { int age;char num[8]; struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; struct student *p=stu;}; 以下选项中引用结构体变量成员的表达式错误的是
有以下说明和定义语句 struct student {int age;char num[8]; }; struct student stu[3]={{20,"200401"},{21,"200402"},{109,"200403"}}; struct student*p=stu;以下选项中引用结构体变量成员的表达式错误的是______。
若有以下定义的语句 struct student {int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() {stmct student *p; p=stu; …} 则以下不正确的引用是
下列结构体类型说明和变量定义中正确的是( )。
设有以下语句:Typedef struct TT{char c; int a[4];}CIN;则下面叙述中错误的是( )。A.不可以用TT定义结构体变量B.TT是结构体标识名C.可以用CIN定义结构体变量D.CIN是struct TT类型的变量
相关题目
有以下语句,则对a数组元素的引用不正确的是(0≤i≤9)
以下对结构变量stul中成员age的非法引用是() struct student  { int age;  int num;  }stu1,*p;  p=&stu1;
struct st {int age;int num;}stul, p; p=&stul;以下对结构体变量stul中成员age的非法引用是( )
若有以下结构体定义,则______是正确的引用或定义。 struct example { int x; int y; }v1;
若有以下结构体,则正确的定义或引用的是struct Test{int x;int y;} vl;
以下结构体类型说明和变量定义中正确的是( )。
若有定义int a[2][3];,则对a数组的第i行第j列(假设i,j已正确说明并赋值.元素值的正确引用为( )。
若有定义int a[2][3];,则对a数组的第i行第j列(假设i,j已正确说明并赋值)元素值的正确引用为
设有以下说明语句: struct stu { int a; float b; }stutype; 则下面叙述不正确的是( )。
设有以下说明语句 struct stu { int a; float b; }stutype; 则下面的叙述不正确的是
设有以下说明语句struct stu{int a;float b;} stutype;则下面的叙述不正确的是
若有以下说明和语句: struct st{int n;char*ch;}; struct st a[3]={5,"abc",7,"def",9,"ghk"},*p=a; 则值为6的表达式是______。
若有以下说明和语句: struct st{int n;char*ch;} struct st a[3]={5,"abc"7,"def",9",ghk"),*p=a; 则值为6的表达式是______。
若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。Struct stu{inti;intname;}st,*#p;p=&St;
若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。 Struct stu { int i; int name; }st,*p; p=&st;
若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。Struct stu{ int i;int name;}st,*p;p=&St;
若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。Stmct stu{ int i;int name;}st,*p;p=&st;
若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。 Struct stu { int i; int name; }st,*p; p=&st;
若有如下语句: struct a {char x[10] int y; }s,*t; t=&s; 则对结构体变量s中的成员y的正确引用是( )
有以下结构体说明和变量的定义,且指针P指向变量a,指针q指向变量b,则不能把结点b连接到结点a之后的语句是( )。struct node {char data; struct node*next;}a,b,*p=&a,*q=&b;
广告位招租WX:84302438

免费的网站请分享给朋友吧