int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%8d %8d %8d", a, b, c); return 0; }
"lihua",'F',18},{1002,"liuxing",'M',19},{1003,"huangke",'F',19},{1004,"fengshou",'...
14 、 /* 用指针变量输出结构体数组元素。 */ struct student { int num; char *name; char sex; int age; }stu[5]={{1001,"lihua",'F',18},{1002,"liuxing",'M',19},{1003,"huangke",'F',19},{1004,"fengshou",'F',19},{1005,"Wangming",'M', 18}}; main() {int i; struct ...
14、/*用指针变量输出结构体数组元素。*/ struct student { int num; char *name; char sex; int age; }stu[5]={{1001,"lihua",'F',18},{1002,"liuxing",'M',19},{1003,"huangke",'F',19},{1004,"fengshou",'F',19},{1005,"Wangming",'M',18}}; main() {int i; struct student ...
c.num=1003;c.name="huangke";c.age=18; head=&a;/*建立链表,a为头结点*/ a.next=&b; b.next=&c; c.next=NULL; p=head;/*输出链表*/ do{ printf("%5d,%s,%3d\n",p->num,p->name,p->age); p=p->next; }while(p!=NULL); ...
c.num=1003; c.name="huangke"; c.age=18; head=&a; /* 建立链表,a为头结点 */ a.next=&b; b.next=&c; c.next=NULL; p=head; /* 输出链表 */ do{ printf("%5d,%s,%3d\n",p->num,p->name,p->age); p=p->next;
9、用指针变量输出结构体数组元素。 struct student { int num; char *name; char sex; int age; }stu[5]={{1001,"lihua",'F',18},{1002,"liuxing",'M',19},{1003,"huangke",'F',19},{1004,"fengshou",'F',19},{1005,"Wangming",'...
c.num=1003;c.name="huangke";c.age=18; head=&a;/建立链表,a为头结点/ a.next=&b; b.next=&c; c.next=NULL; p=head;/输出链表/ do{ printf("%5d,%s,%3d\n",p->num,p->name,p->age); p=p->next; }while(p!=NULL);
c.num=1003; c.name="huangke"; c.age=18; head=&a; /* 建立链表,a为头结点 */ a.next=&b; b.next=&c; c.next=NULL; p=head; /* 输出链表 */ do{ printf("%5d,%s,%3d\n",p->num,p->name,p->age); p=p->next;
c.num=1003;c.name="huangke"; c.age=18; head=&a; /* 建立链表,a为头结点 */ a.next=&b; b.next=&c; c.next=NULL; p=head; /* 输出链表 */ do{ printf("%5d,%s,%3d\n",p->num,p->name,p->age); p=p->next; }while(p!=NULL); ...