对以下定义,能输出字符串"Mary"的语句是( )。struct student { char name[20]; int age; }; struct student stu[100]={"John",16,"Paul",17,"Mary",18 }; A: printf("%s",stu[2].name); B: printf("%s",stu[1].name); C: printf("%s",stu[2]); D: printf("%s",stu[1]);
对以下定义,能输出字符串"Mary"的语句是( )。struct student { char name[20]; int age; }; struct student stu[100]={"John",16,"Paul",17,"Mary",18 }; A: printf("%s",stu[2].name); B: printf("%s",stu[1].name); C: printf("%s",stu[2]); D: printf("%s",stu[1]);
下列定义中,()是定义指向Stu对象数组的指针p。 A: Stu*p[5]; B: Stu(*p)[5]; C: (Stu*)p[5]; D: Stu*p();
下列定义中,()是定义指向Stu对象数组的指针p。 A: Stu*p[5]; B: Stu(*p)[5]; C: (Stu*)p[5]; D: Stu*p();
下面选项中,查询stu表中id值不在2和5之间的学生的SQL语句是( )。 A: select * from stu where id != 2,3,4,5; B: select * from stu where id not betwen 5 and 2; C: select * from stu where id not betwen 2 and 5; D: select * from stu where id not in 2,3,4,5;
下面选项中,查询stu表中id值不在2和5之间的学生的SQL语句是( )。 A: select * from stu where id != 2,3,4,5; B: select * from stu where id not betwen 5 and 2; C: select * from stu where id not betwen 2 and 5; D: select * from stu where id not in 2,3,4,5;
如果下面变量已经正确定义和赋初值,不能正确计算5!的循环语句是:( ) A: s=1;for(i=1;i<=5;i++)s=s*i;printf("%d",s); B: for(s=1,i=1;i<=5;i++)s=s*i;printf("%d",s); C: s=1;for(i=1;i<=5;s=s*i,i++);printf("%d",s); D: s=1;for(i=1;i<=5;i++);s=s*i;printf("%d",s);
如果下面变量已经正确定义和赋初值,不能正确计算5!的循环语句是:( ) A: s=1;for(i=1;i<=5;i++)s=s*i;printf("%d",s); B: for(s=1,i=1;i<=5;i++)s=s*i;printf("%d",s); C: s=1;for(i=1;i<=5;s=s*i,i++);printf("%d",s); D: s=1;for(i=1;i<=5;i++);s=s*i;printf("%d",s);
已知stu = ('李明',18,'四川'),print(stu[1])的输出结果为____________
已知stu = ('李明',18,'四川'),print(stu[1])的输出结果为____________
中国大学MOOC: 写出下面程序执行后的运行结果。#include <stdio.h>struct STU {char name[10];int num;int Score;};int main(){struct STU s[5]={{"YangSan",20041,703},{"LiSiGuo",20042,580},{"wangYin",20043,680},{"SunDan",20044,550},{"Penghua",20045,537}},*p[5],*t;int i,j;for(i=0;i<5;i++) p[i]=&s[i];for(i=0;i<4;i++)for(j=i+1;j<5;j++)if(p[i]->Score>p[j]->Score){ t=p[i]; p[i]=p[j]; p[j]=t;}printf("%d %d",s[1].Score,p[1]->Score); return 0;}
中国大学MOOC: 写出下面程序执行后的运行结果。#include <stdio.h>struct STU {char name[10];int num;int Score;};int main(){struct STU s[5]={{"YangSan",20041,703},{"LiSiGuo",20042,580},{"wangYin",20043,680},{"SunDan",20044,550},{"Penghua",20045,537}},*p[5],*t;int i,j;for(i=0;i<5;i++) p[i]=&s[i];for(i=0;i<4;i++)for(j=i+1;j<5;j++)if(p[i]->Score>p[j]->Score){ t=p[i]; p[i]=p[j]; p[j]=t;}printf("%d %d",s[1].Score,p[1]->Score); return 0;}
根据下列的定义,能打印出字母P的语句是( ) struct stu char name[10]; int age; ; stmct stu s[10]="John",11, "Paul",12, "Mary",11, "adam",12 : A: printf("%c",s[3].name); B: printf("%c",s[3].name[1]); C: printf("%c",s[2].name[11]); D: printf("%c",s[1].name[0]);
根据下列的定义,能打印出字母P的语句是( ) struct stu char name[10]; int age; ; stmct stu s[10]="John",11, "Paul",12, "Mary",11, "adam",12 : A: printf("%c",s[3].name); B: printf("%c",s[3].name[1]); C: printf("%c",s[2].name[11]); D: printf("%c",s[1].name[0]);
s= HelloWorld 下面可以输出World字符串的是: A: print(s[-5:]) B: print(s[-5:-1]) C: print(s[-4:-1]) D: print(s[-5:0])
s= HelloWorld 下面可以输出World字符串的是: A: print(s[-5:]) B: print(s[-5:-1]) C: print(s[-4:-1]) D: print(s[-5:0])
均质坝的渗透系数为()。 A: 不大于1×10cm<sup>-5</sup>/s B: 不小于1×10cm<sup>-5</sup>/s C: 不大于1×10cm<sup>-5</sup>/s D: 不小于1×10cm<sup>-5</sup>/s
均质坝的渗透系数为()。 A: 不大于1×10cm<sup>-5</sup>/s B: 不小于1×10cm<sup>-5</sup>/s C: 不大于1×10cm<sup>-5</sup>/s D: 不小于1×10cm<sup>-5</sup>/s
分析下面的程序,下列说法中错误的是 ________ 。 #define NULL 0 #include "conio.h" struct stu { long num; char name[20]; int score; struct stu * next; }; int main() { struct stu *head,*p,*pa,*pb,*pc; pa=(struct stu *)malloc(sizeof(struct stu)); pb=(struct stu *)malloc(sizeof(struct stu)); pc=(struct stu *)malloc(sizeof(struct stu)); scanf("%ld%s%d",&pa->num,pa->name,&pa->score); scanf("%ld%s%d",&pb->num,pb->name,&pb->score); scanf("%ld%s%d",&pc->num,pc->name,&pc->score); head=pa; pa->next=pb; pb->next=pc; pc->next=NULL; p=head; while(p!=NULL) { printf("%ld,%s,%d\n",p->num,p->name,p->score); p=p->next; } }
分析下面的程序,下列说法中错误的是 ________ 。 #define NULL 0 #include "conio.h" struct stu { long num; char name[20]; int score; struct stu * next; }; int main() { struct stu *head,*p,*pa,*pb,*pc; pa=(struct stu *)malloc(sizeof(struct stu)); pb=(struct stu *)malloc(sizeof(struct stu)); pc=(struct stu *)malloc(sizeof(struct stu)); scanf("%ld%s%d",&pa->num,pa->name,&pa->score); scanf("%ld%s%d",&pb->num,pb->name,&pb->score); scanf("%ld%s%d",&pc->num,pc->name,&pc->score); head=pa; pa->next=pb; pb->next=pc; pc->next=NULL; p=head; while(p!=NULL) { printf("%ld,%s,%d\n",p->num,p->name,p->score); p=p->next; } }