A.Select S1.S# From SC S1, SC S2 Where S1.S# = S2.S# and S1.C#=‘001’ and S2.C#=‘002’ and S1.Score > S2.Score;
B.Select S1.S# From SC S1, SC S2 Where S1.S# = S2.S# and S1.C#=‘001’ and S2.C#=‘002’ and S2.Score > S1.Score;
C.Select S1.S# From SC S1, SC S2 Where S1.S# = S2.S# and S1.C#=‘001’ and S2.C#=‘002 ;
D.Select * From SC S1, SC S2 Where S1.S# = S2.S# and S1.C#=‘001’ and S2.C#=‘002’ and S1.Score > S2.Score;
第1题
SC
SNO CNO GRADE
001 c1 90
001 c2 65
002 c1 80
002 c2 90
002 c3 86
执行SQL语句“SELECT DISTINCT cno FROM sc”的结果中的元组数是
A.2
B.3
C.4
D.5
第2题
第3题
A.不能
B.必须
C.自动地
D.也可以
第4题
CREATE TRIGGER tri1 ON SC AFTER INSERT,
当执行语句:INSERT INTO SC VALUES('s001', 'c01',90)
会引发该触发器执行。关于触发器执行时表中数据的说法,正确的是( )。
A.SC表和INSERTED表中均包含新插入的数据
B.SC表和INSERTED表中均不包含新插入的数据
C.SC表中包含新插入的数据, INSERTED表中不包含新插入的数据
D.SC表中不包含新插入的数据, INSERTED表中包含新插入的数据
第5题
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。
试题程序:
include <stdio.h>
define N 16
typedef struct
{ char num[10];
int s;
}STREC;
int fun(STREC *a,STREC *b)
{
}
main ()
{
STREC s [N] = { { "GA005", 85 }, { "GA003", 76 },
{ "GA002", 69 }, { "GA004", 85 }, { "GA001", 91 },
{"GA007", 72}, {"GA008", 64}, {"GA006", 87},
{ "GA015", 85), ( "GA013", 91 }, { "GA012", 64 },
{ "GA014", 91 ), { "GA011", 66}, { "GA017", 64 },
{"GA018", 64 }, {"GA016", 72 } };
STREC h[N];
int i, n;
FILE *out;
n=fun(s,h);
printf("The %d highest score :\n",n);
for (i=0; i<n; i++)
printf("%s %4d\n ",h[i].num, h[i].s);
/*输出最高分学生的学号和成绩* /
printf("\n");
ut=fopen("out45.dat", "w");
fprintf(out, "%d\n",n);
for(i=0; i<n; i++)
fprintf(out, "%4d\n ",h[i].s);
fclose(out);
}
第6题
第7题
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。
试题程序:
include <stdio.h>
define N 16
typedef struct
{char num[10];
int s;
}STREC;
int fun (STREC *a,STREC *b)
{
}
main ()
{
STREC s[N]={{“GA005”,82},{“GA003”,75},
{“GA002”,85},{“GA004”,78},{“GA001”,95},
{“GA007”,62},{“GA008”,60},{“GA006”,85},
{“GA015”,83},{“GA013”,94},{“GA012”,78},
{“GA014”,97},{“GA011”,60},{“GA017”,65},
{“GA018”,60},{“GA016”,74}};
STREC h[N];
int i,n;
FILE *out;
n=fun(S,h);
printf(“The %d lowest score:\n”,n);
for (i=0; i<n; i++)
printf(“%s %4d\n”,h[i].mum,h[i].s);
/*输出最低分学生的学号和成绩*/
printf(“\n”);
out=fopen("outl9.dat",“w”);
fprintf(out,“%d\n”,n);
for(i=0; i<n; i++);
fprintf(out, “%4d\n”,h[i].s);
fclose(out);
}
第8题
A.G00、G01、G02是同组模态代码
B.G17、G42、G40是同组模态代码
C.M03、M08是同组模态代码
D.M05、M09是同组模态代码
第9题
#include
#define N 16
typedef struct
{char num[10];
int s ;
} STREC;
int fun (STREC *a, STREC *b)
{int i,j=0,max=a[0].s;
for(i=0;i
if(max
for(i=0;i
if(【20】)b[j++]=a[i];
return j;
}
main ()
{STREC s[N]={{ "GA005",85},{"GA003",76},{"GA002",69},{"GA004",85},
{"GA001",91},{"GA007",72},{"GA008",64},{"GA006",87},
{ "GA015",85},{"GA013",91},{"GA012",64},{"GA014",91},
{"GA011",66},{"GA017",64},{"GA018",64},{"GA016",72}
};
STREC h[N];
int i, n;FILE *out;
n=fun(s,h);
printf("The %d highest score :\n",n);
for (i=0; i
printf("%s M\n ",h[i].num,h[i].s);
printf("\n");
out=fopen("out15.dat", "w");
fprintf(out, "%d\n",n);
for(i=0; i
fprintf(out, "M\n ",h[i].s);
fclose(out);
}
第10题
编号 名称 备注 001 全站仪 测角精度J1级 002 全站仪 测角精度J2级 003 经纬仪 测角精度J6级 004 水准仪 S1级 005 水准仪 S3级
现需要对一座长7000 米的山岭隧道进行洞外控制测量,要求达到三等导线、二等水准精度,则( )号仪器符合测量精度要求。
A.001
B.002
C.003
D.004
E.005
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!