任务38:结构体指针 《编程语言-C语言》45分钟专题训练

| 2份
| 25页
| 84人阅读
| 1人下载

内容正文:

湖南省职教高考《编程语言—C语言》45分钟专题训练专辑,共43份试卷。试卷命题与高考紧密相关,精选具有代表性和典型性的高考常考题。旨在帮助学生系统地复习和巩固计算机类理论知识,熟悉高考题型和命题规律,提高解题能力和应试技巧,为高考取得优异成绩打下坚实的基础,本训练卷适用于即将参加计算机类高考的学生。与本专辑配套的还有湖南省职教高考《计算机应用基础》《计算机组装与维护》《计算机网络技术》45分钟专题训练专辑,欢迎同学和老师们下载使用。 《编程语言—C语言》 项目八: 结构体、共用体、链表 第38卷: 结构体指针 时间:45分钟 总分:100分 班级___________ 姓名__________ 学号__________ 成绩________ 一、选择题(共23小题,每小题2分,共46分) 1. 设有定义:struct stu{int x;float y;}time,*t;t=&time;则对time中成员的引用正确的是( ) A.stu.x B.t.x C.(*t).x D.time->x 【答案】C。结构体指针变量表示成员有两种表示法:指针变量名->成员或(*指针变量).成员。 2.设有以下程序段,则下列选项中,表达式值为11的是( ) struct st{int x;int *y;}*pt; int a[ ]={1,2}; int b[ ]={3,4}; struct st c[2]={10,a,20,b}; pt=c; A.++pt->x B.*pt->y C.pt->x D.(pt++)->x 【答案】A 3.设有以下程序段,以下选项中引用结构体变量成员的表达式,不正确的一项是( ) struct student {int age; char num[8];}; struct student stu[3]={{20,"202501"},{21,"202502"},{19,"202503"}}; struct student *p=stu; A.(p++)->num B.p->num C.(*p).num D.stu[3].age 【答案】D 4.设有定义:struct sk{int a;float b;}data,*p;,若有p=&data;,则对data中a域的正确引用是( ) A.(*p).data.a B.(*p).a C.p->data.a D.p.data.a 【答案】B 5.设有定义:struct sk{int n;float x;}data,*p;,若要使p指向data中的n域,正确的赋值语句是( ) A.p=&data.n; B.*p=data.n C.p=(struct sk *)&data.n; D.p=(struct sk *)data.n; 【答案】C 6.设有以下定义,则对结构体变量stu1中成员age的非法引用是( ) struct student {int age;int num;}stu1,*p; p=&stu1; A.stu1.age B.student.age C.p->age D.(*p).age 【答案】B 7.设有定义:struct{char name[15],sex;int age;float score;}stu,*p=&stu;,则下列选项中,不能正确输入结构体成员值的是( ) A. scanf("%c",&p->sex); B. scanf("%s",stu.name); C. scanf("%d",&stu.age); D. scanf("%f",p->score) 【答案】D 8.设有定义:struct{int x,y;}s[2]={{1,2},{3,4}},*p=s,*q=s;,则表达式++p->x和表达式(++q)->x的值分别为( ) A.1和1 B. 1和3 C. 2和3 D. 3和3 【答案】C 9.设有定义和语句:struct{int day;char mouth;int year;}a,*b;b=&a;,则sizeof(b)的值是( ) A.1 B.2 C.4 D.8 【答案】C。C编译软件为指针分配4个字节的空间。 10.设有以下程序段,则输出结果是( ) main() {struct st{int x;int *y;}*pt; int a[ ]={5,6},b[ ]={7,8}; struct st c[2]={20,a,17,b}; pt=c; printf("%d",(pt++)->x);getch();} A.21 B.20 C.17 D.18 【答案】B 11.设有一个名为“student”的结构体,其中定义了两个成员变量“name”和“age”,下列用于定义一个指向“student”类型的指针变量的是( ) A.int *studentptr; B.student *studentptr; C.char *studentptr; D.double *studentptr; 【答案】B 12.设有以下定义和语句,则下列选项中能给s中的year成员赋值2026的语句是( ) struct student{int No;char name[10];char sex; strcuct{int year,month,day;}birth;}; struct student s,*ps;ps=&s; A.s.year=2026; B.ps.year=2026; C.ps->year=2026; D.s.birth.year=2026 【答案】D 13.设有定义:struct people{int id;char name[10];}peo,*s=&per;,则下列选项中对结构体成员的引用,不正确的一项是( ) A.peo.name B.s->name[0] C.(*peo).name[8] D.(*s).id 【答案】C 14.设有定义:struct pupil{char name[10];int age;int sex;}pup[5],*p;,则下列选项中,scanf函数调用语句中对结构体变量成员的引用,不正确的一项是( ) A. scanf("%s",pup[0].name); B. scanf("%d",pup[0].age); C. scanf("%d",&(p->sex)); D. scanf("%d",&p->age); 【答案】B 15.执行以下程序段后,下列选项中引用不正确的一项是( ) struct s{int d1;struct s *d2,*d0;}; static struct s a[3]= {2,&a[1],’\0’,4,&a[2],&a[0],6,’\0’,&a[1]},*ptr;ptr=a; A.ptr->d1++ B.*ptr->d2 C.++ptr->d0 D.*ptr->d1 【答案】D 16.设有定义:struct pupil{char name[10];int sex;}pup,*p;p=&pup;,则下列选项中,对pup中sex域的正确引用方式是( ) A.p.pup.sex B.p->pup.sex C.(*p).pup.sex D.(*p).sex 【答案】D 17.设有定义:struct student{int age;int num;}std,*p;p=&std;,则下列选项中对结构体变量std中成员num的引用方式不正确的是( ) A.std.num B.p->num C.(*p).num D.*p.num 【答案】D。注意优先级。 18.设有定义:struct add{int num;char flag;char ad[20];}rec[10],*pr=rec;,则下列选项中,输入语句不正确的一项是( ) A. scanf("%s",&rec.ad); B. scanf("%d",&(*pr).num); C. scanf("%c",&(pr->flag)); D. scanf("%c",&rec[1].flag); 【答案】A 19.执行以下程序段的输出结果是( ) struct st{int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[1],60,&dt[2],62,&dt[3]}; main() {p=aa;printf("%d ",++(p->x));getch();} A.10 B.11 C.50 D.51 【答案】D 20.执行以下程序的输出结果是( ) main() {struct s{int x;struct s *y;}; static struct s a[3]={1,&a[1],2,&a[2],3,&a[0]},*ptr; ptr=&a[1]; printf("%d",ptr++->x);getch();} A.0 B.1 C.2 D.3 【答案】C 21.执行以下程序的输出结果是( ) main() {struct s{int x;struct s *y;}; static struct s a[3]={1,&a[1],2,&a[2],3,&a[0]},*ptr; ptr=&a[1]; printf("%d",*ptr->x);getch();} A.1 B.2 C.3 D.有语法错 【答案】D 22.设有以下定义和语句,则下列选项中,不能正确引用结构体变量std中color成员的是( ) struct MP4{char name[10];char color;float price;}std,*ptr; ptr=&std; A.std.color B.ptr->color C.std->color D.(*ptr).color 【答案】C 23.执行以下程序段的输出结果是( ) struct num{int a;int b;char c;}n[2]={1,3,'a',2,4,'A'}; main() {struct num *pn=n; printf("%d,%c",pn->a,pn->c);getch();} A.2,A B.1,3 C.2,4 D. 1,a 【答案】D 二、程序运行结果题(本题共7小题,每题3分,共21分) 24.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct NODE {int k;struct NODE *link;}; main() {struct NODE m[5],*p=m,*q=m+4; int i=0; while(p!=q) {p->k=++i;p++; q->k=i++;q--;} q->k=i; for(i=0;i<5;i++) printf("%d",m[i].k); getch();}; 【答案】13431 25.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct num {int a;int b;float f;}n={1,3,5.0}; main() {struct num *pn=&n; printf("%d ",pn->b/n.a*++pn->b); printf("%f",(*pn).a+pn->f); getch();} 【答案】16 6.000000 26.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct ks {int a;int *b;}s[4],*p; main() {int n=1,i; for(i=0;i<4;i++) {s[i].a=n;s[i].b=&s[i].a;n=n+2;} p=&s[0]; p++; printf("%d,%d ",(++p)->a,(p++)->a); getch();} 【答案】7,3 27.以下程序的运行结果是( ) #include <stdio.h> #include<string.h> #include <conio.h> typedef struct student {char name[10];long year;float score;}STU; main() {STU a={"zhangsan",2012,95},b={"wangwu",2011,95}, c={"lisi",2012,98},d,*p=&d;d=a; if(strcmp(a.name,b.name)>0) d=b; if(strcmp(c.name,d.name)>0) d=c; printf("%d%s ",d.year,p->name); getch();} 【答案】2011wangwu 28.以下程序的运行结果是( ) #include <stdio.h> #include <conio.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 ",p->next->n); getch();} 【答案】24 29.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct s{int a;float b;char *c;} ; main( ) {static struct s x={19,79.2,"wang"}; struct s *px=&x; printf("%c %s ",*px->c-1,&px->c[1]); printf("%d %.lf %s ",x.a,x.b,x.c); printf("%d %.lf %s ",px->a,(*px).b,px->c); getch();} 【答案】 v ang 19 79 wang 19 79 wang 30.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct abc{ char c;float v;}; void funl(struct abc b) { b.c='A';b.v=80.7;} void fun2(struct abc*b) {(*b).c='C'; (*b).v=92.5;} main( ) {struct abc a={'B',98.5}; funl(a); printf("%c,%4.1f ",a.c,a.v); fun2(&a); printf("%c,%4.1f ",a.c,a.v); getch();} 【答案】 B,98.5 C,92.5 三、阅读程序,修改程序中的错误,不得增行或删行,也不得更改程序结构。请指出错误代码所在的行号,并给出该行修改后的程序代码。每处3分,共9分) 31.下列程序的功能是:通过指向结构体变量的指针变量输出结构体变量中成员的信息。程序中有三处错误,请改正。 L1 #include <stdio.h> L2 #include<conio.h> L3 #include<string.h> L4 struct student L5 {long num; L6 char name[20]; L7 char sex; L8 float score;}; L9 main() L10 {struct student stu_1; L11 struct student p; L12 p=stu_1; L13 stu_1.num=10101; L14 strcpy(stu_1.name,"Lilin"); L15 stu_1.sex='M'; L16 stu_1.score=89.5; L17 printf("N0:%d name:%s sex:%c score:%.1f ", L18 stu_1.num,stu_1.name,stu_1.sex,stu_1.score); L19 printf(" N0:%d name:%s sex:%c score:%.1f ", L20 *p.num,*p.name,*p.sex,*p.score); L21 getch();} 答案: L11 struct student *p; L12 p=&stu_1; L20 (*p).num,(*p).name,(*p).sex,(*p).score); 四、程序填空。按照题目要求,将正确的内容填入相应位置,使得程序完整(每空3分,共24分) 32.下列程序的功能是:结构体数组中存有3人的姓名和年龄,通过程序输出3人中最年长者的姓名和年龄,请填空。 #include <stdio.h> #include<conio.h> static struct man { char name[20]; int age;}person[ ]={ "li-min",23,"wang-hua",32,"zhang-pin",25}; main( ) { struct man *p,*q; int old=0; p=person; for( ;【1】;p++) if(【2】) { q=p; old=【3】;} printf("%s %d",【4】); getch();} 答案:①p<person+3或p<=person+2 ②old<(*p).age或old<p->age ③(*p).age或p->age ④(*q).name,(*q).age或q->name,q->age 33.以下程序输入若干人员的姓名(6位字母)及其电话号码(7位数字),以字符#结束输入。然后输入姓名,查找该人的电话号码。数据从s[1]开始存放。请填空。 #include <stdio.h> #include<conio.h> #include<string.h> #define MAX 101 struct aa{ char name[5]; char tel[8];}; main( ) { struct aa s[MAX]; int num; char name[5]; readin(s,&num); printf("Enter a name:"); gets(name); search(s,name,num); getch();} int readin(struct aa*a,int *n) { int i=1; gets(a[i].name); gets(a[i].tel); while(【1】) { i++;gets(a[i].name); gets(a[i].tel);} *n=【2】; return 0;} int search(【3】,char *x,int n) {int i; strcpy(b[0].name,x); i=n; while(strcmp(b[i].name,x)) i--; if(【4】) printf("name:%s tel:%s ",b[i].name,b[i].tel ); else printf("Not been found !");return 0;} 答案:①strcmp(a[i].name,"#") ②- -i ③struct aa*b ④i!=0 原创精品资源学科网独家享有版权,侵权必究! 学科网(北京)股份有限公司 $$ 湖南省职教高考《编程语言—C语言》45分钟专题训练专辑,共43份试卷。试卷命题与高考紧密相关,精选具有代表性和典型性的高考常考题。旨在帮助学生系统地复习和巩固计算机类理论知识,熟悉高考题型和命题规律,提高解题能力和应试技巧,为高考取得优异成绩打下坚实的基础,本训练卷适用于即将参加计算机类高考的学生。与本专辑配套的还有湖南省职教高考《计算机应用基础》《计算机组装与维护》《计算机网络技术》45分钟专题训练专辑,欢迎同学和老师们下载使用。 《编程语言—C语言》 项目八: 结构体、共用体、链表 第38卷: 结构体指针 时间:45分钟 总分:100分 班级___________ 姓名__________ 学号__________ 成绩________ 一、选择题(共23小题,每小题2分,共46分) 1. 设有定义:struct stu{int x;float y;}time,*t;t=&time;则对time中成员的引用正确的是( ) A.stu.x B.t.x C.(*t).x D.time->x 2.设有以下程序段,则下列选项中,表达式值为11的是( ) struct st{int x;int *y;}*pt; int a[ ]={1,2}; int b[ ]={3,4}; struct st c[2]={10,a,20,b}; pt=c; A.++pt->x B.*pt->y C.pt->x D.(pt++)->x 3.设有以下程序段,以下选项中引用结构体变量成员的表达式,不正确的一项是( ) struct student {int age; char num[8];}; struct student stu[3]={{20,"202501"},{21,"202502"},{19,"202503"}}; struct student *p=stu; A.(p++)->num B.p->num C.(*p).num D.stu[3].age 4.设有定义:struct sk{int a;float b;}data,*p;,若有p=&data;,则对data中a域的正确引用是( ) A.(*p).data.a B.(*p).a C.p->data.a D.p.data.a 5.设有定义:struct sk{int n;float x;}data,*p;,若要使p指向data中的n域,正确的赋值语句是( ) A.p=&data.n; B.*p=data.n C.p=(struct sk *)&data.n; D.p=(struct sk *)data.n; 6.设有以下定义,则对结构体变量stu1中成员age的非法引用是( ) struct student {int age;int num;}stu1,*p; p=&stu1; A.stu1.age B.student.age C.p->age D.(*p).age 7.设有定义:struct{char name[15],sex;int age;float score;}stu,*p=&stu;,则下列选项中,不能正确输入结构体成员值的是( ) A. scanf("%c",&p->sex); B. scanf("%s",stu.name); C. scanf("%d",&stu.age); D. scanf("%f",p->score) 8.设有定义:struct{int x,y;}s[2]={{1,2},{3,4}},*p=s,*q=s;,则表达式++p->x和表达式(++q)->x的值分别为( ) A.1和1 B. 1和3 C. 2和3 D. 3和3 9.设有定义和语句:struct{int day;char mouth;int year;}a,*b;b=&a;,则sizeof(b)的值是( ) A.1 B.2 C.4 D.8 10.设有以下程序段,则输出结果是( ) main() {struct st{int x;int *y;}*pt; int a[ ]={5,6},b[ ]={7,8}; struct st c[2]={20,a,17,b}; pt=c; printf("%d",(pt++)->x);getch();} A.21 B.20 C.17 D.18 11.设有一个名为“student”的结构体,其中定义了两个成员变量“name”和“age”,下列用于定义一个指向“student”类型的指针变量的是( ) A.int *studentptr; B.student *studentptr; C.char *studentptr; D.double *studentptr; 12.设有以下定义和语句,则下列选项中能给s中的year成员赋值2026的语句是( ) struct student{int No;char name[10];char sex; strcuct{int year,month,day;}birth;}; struct student s,*ps;ps=&s; A.s.year=2026; B.ps.year=2026; C.ps->year=2026; D.s.birth.year=2026 13.设有定义:struct people{int id;char name[10];}peo,*s=&per;,则下列选项中对结构体成员的引用,不正确的一项是( ) A.peo.name B.s->name[0] C.(*peo).name[8] D.(*s).id 14.设有定义:struct pupil{char name[10];int age;int sex;}pup[5],*p;,则下列选项中,scanf函数调用语句中对结构体变量成员的引用,不正确的一项是( ) A. scanf("%s",pup[0].name); B. scanf("%d",pup[0].age); C. scanf("%d",&(p->sex)); D. scanf("%d",&p->age); 15.执行以下程序段后,下列选项中引用不正确的一项是( ) struct s{int d1;struct s *d2,*d0;}; static struct s a[3]= {2,&a[1],’\0’,4,&a[2],&a[0],6,’\0’,&a[1]},*ptr;ptr=a; A.ptr->d1++ B.*ptr->d2 C.++ptr->d0 D.*ptr->d1 16.设有定义:struct pupil{char name[10];int sex;}pup,*p;p=&pup;,则下列选项中,对pup中sex域的正确引用方式是( ) A.p.pup.sex B.p->pup.sex C.(*p).pup.sex D.(*p).sex 17.设有定义:struct student{int age;int num;}std,*p;p=&std;,则下列选项中对结构体变量std中成员num的引用方式不正确的是( ) A.std.num B.p->num C.(*p).num D.*p.num 18.设有定义:struct add{int num;char flag;char ad[20];}rec[10],*pr=rec;,则下列选项中,输入语句不正确的一项是( ) A. scanf("%s",&rec.ad); B. scanf("%d",&(*pr).num); C. scanf("%c",&(pr->flag)); D. scanf("%c",&rec[1].flag); 19.执行以下程序段的输出结果是( ) struct st{int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,&dt[0],60,&dt[1],60,&dt[2],62,&dt[3]}; main() {p=aa;printf("%d ",++(p->x));getch();} A.10 B.11 C.50 D.51 20.执行以下程序的输出结果是( ) main() {struct s{int x;struct s *y;}; static struct s a[3]={1,&a[1],2,&a[2],3,&a[0]},*ptr; ptr=&a[1]; printf("%d",ptr++->x);getch();} A.0 B.1 C.2 D.3 21.执行以下程序的输出结果是( ) main() {struct s{int x;struct s *y;}; static struct s a[3]={1,&a[1],2,&a[2],3,&a[0]},*ptr; ptr=&a[1]; printf("%d",*ptr->x);getch();} A.1 B.2 C.3 D.有语法错 22.设有以下定义和语句,则下列选项中,不能正确引用结构体变量std中color成员的是( ) struct MP4{char name[10];char color;float price;}std,*ptr; ptr=&std; A.std.color B.ptr->color C.std->color D.(*ptr).color 23.执行以下程序段的输出结果是( ) struct num{int a;int b;char c;}n[2]={1,3,'a',2,4,'A'}; main() {struct num *pn=n; printf("%d,%c",pn->a,pn->c);getch();} A.2,A B.1,3 C.2,4 D. 1,a 二、程序运行结果题(本题共7小题,每题3分,共21分) 24.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct NODE {int k;struct NODE *link;}; main() {struct NODE m[5],*p=m,*q=m+4; int i=0; while(p!=q) {p->k=++i;p++; q->k=i++;q--;} q->k=i; for(i=0;i<5;i++) printf("%d",m[i].k); getch();}; 25.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct num {int a;int b;float f;}n={1,3,5.0}; main() {struct num *pn=&n; printf("%d ",pn->b/n.a*++pn->b); printf("%f",(*pn).a+pn->f); getch();} 26.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct ks {int a;int *b;}s[4],*p; main() {int n=1,i; for(i=0;i<4;i++) {s[i].a=n;s[i].b=&s[i].a;n=n+2;} p=&s[0]; p++; printf("%d,%d ",(++p)->a,(p++)->a); getch();} 27.以下程序的运行结果是( ) #include <stdio.h> #include<string.h> #include <conio.h> typedef struct student {char name[10];long year;float score;}STU; main() {STU a={"zhangsan",2012,95},b={"wangwu",2011,95}, c={"lisi",2012,98},d,*p=&d;d=a; if(strcmp(a.name,b.name)>0) d=b; if(strcmp(c.name,d.name)>0) d=c; printf("%d%s ",d.year,p->name); getch();} 28.以下程序的运行结果是( ) #include <stdio.h> #include <conio.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 ",p->next->n); getch();} 29.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct s{int a;float b;char *c;} ; main( ) {static struct s x={19,79.2,"wang"}; struct s *px=&x; printf("%c %s ",*px->c-1,&px->c[1]); printf("%d %.lf %s ",x.a,x.b,x.c); printf("%d %.lf %s ",px->a,(*px).b,px->c); getch();} 30.以下程序的运行结果是( ) #include <stdio.h> #include <conio.h> struct abc{ char c;float v;}; void funl(struct abc b) { b.c='A';b.v=80.7;} void fun2(struct abc*b) {(*b).c='C'; (*b).v=92.5;} main( ) {struct abc a={'B',98.5}; funl(a); printf("%c,%4.1f ",a.c,a.v); fun2(&a); printf("%c,%4.1f ",a.c,a.v); getch();} 三、阅读程序,修改程序中的错误,不得增行或删行,也不得更改程序结构。请指出错误代码所在的行号,并给出该行修改后的程序代码。每处3分,共9分) 31.下列程序的功能是:通过指向结构体变量的指针变量输出结构体变量中成员的信息。程序中有三处错误,请改正。 L1 #include <stdio.h> L2 #include<conio.h> L3 #include<string.h> L4 struct student L5 {long num; L6 char name[20]; L7 char sex; L8 float score;}; L9 main() L10 {struct student stu_1; L11 struct student p; L12 p=stu_1; L13 stu_1.num=10101; L14 strcpy(stu_1.name,"Lilin"); L15 stu_1.sex='M'; L16 stu_1.score=89.5; L17 printf("N0:%d name:%s sex:%c score:%.1f ", L18 stu_1.num,stu_1.name,stu_1.sex,stu_1.score); L19 printf(" N0:%d name:%s sex:%c score:%.1f ", L20 *p.num,*p.name,*p.sex,*p.score); L21 getch();} 四、程序填空。按照题目要求,将正确的内容填入相应位置,使得程序完整(每空3分,共24分) 32.下列程序的功能是:结构体数组中存有3人的姓名和年龄,通过程序输出3人中最年长者的姓名和年龄,请填空。 #include <stdio.h> #include<conio.h> static struct man { char name[20]; int age;}person[ ]={ "li-min",23,"wang-hua",32,"zhang-pin",25}; main( ) { struct man *p,*q; int old=0; p=person; for( ;【1】;p++) if(【2】) { q=p; old=【3】;} printf("%s %d",【4】); getch();} 33.以下程序输入若干人员的姓名(6位字母)及其电话号码(7位数字),以字符#结束输入。然后输入姓名,查找该人的电话号码。数据从s[1]开始存放。请填空。 #include <stdio.h> #include<conio.h> #include<string.h> #define MAX 101 struct aa{ char name[5]; char tel[8];}; main( ) { struct aa s[MAX]; int num; char name[5]; readin(s,&num); printf("Enter a name:"); gets(name); search(s,name,num); getch();} int readin(struct aa*a,int *n) { int i=1; gets(a[i].name); gets(a[i].tel); while(【1】) { i++;gets(a[i].name); gets(a[i].tel);} *n=【2】; return 0;} int search(【3】,char *x,int n) {int i; strcpy(b[0].name,x); i=n; while(strcmp(b[i].name,x)) i--; if(【4】) printf("name:%s tel:%s ",b[i].name,b[i].tel ); else printf("Not been found !");return 0;} 原创精品资源学科网独家享有版权,侵权必究! 学科网(北京)股份有限公司 $$

资源预览图

任务38:结构体指针  《编程语言-C语言》45分钟专题训练-第1页
1
任务38:结构体指针  《编程语言-C语言》45分钟专题训练-第2页
2
任务38:结构体指针  《编程语言-C语言》45分钟专题训练-第3页
3

由于学科网是一个信息分享及获取的平台,不确保部分用户上传资料的 来源及知识产权归属。如您发现相关资料侵犯您的合法权益,请联系学科网,我们核实后将及时进行处理。