有一个名为“Students”的SQL Server数据库,在其中有一个包含学号、姓名、性别、班级、数学、语文、英语7个字段的“学生成绩表”,使用该数据库中的信息,写出实现下列要求的SQL语句。 查询所有男生的数据记录
第1题:
试题五(共15分)
阅读以下说明和 C++代码,将应填入 (n) 处的语句或语句成分写在答题纸的对应栏内。
【说明】
某数据文件students.txt的内容为100名学生的学号和成绩,下面的程序将文件中的数据全部读入对象数组,按分数从高到低进行排序后选出排名前 30%的学生。
【C++代码】
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class Student {
private:
string sNO; //学号
int credit; //分数
public:
Student(string a,int b) { sNO = a; credit = b;}
Student(){}
int getCredit();
void out();
};
(1) ::getCredit() {
return credit;
}
(2) ::out() {
cout << "SNO: " << sNO << ", Credit=" << credit << endl;
}
class SortStudent {
public:
void sort(Student *s, int n);
SortStudent(){}
};
void SortStudent::sort(Student *s,int n) {
for(int i = 0; i < n-1; i++) {
for(int j = i+1; j < n; j++) {
if(s[i]. (3) < s[j]. (4) ) {
Student temp = s[i]; s[i] = s[j]; s[j] = temp;
}
}
}
}
int main(int argc, char* argv[])
{
const int number = 100; //学生总数
ifstream students;
students.open("students.txt");
if(!students.is_open()) {
throw 0;
}
Student *testStudent = (5) [number];
int k = 0;
string s;
while (getline(students,s,'\n')) { //每次读取一个学生的学号和成绩
Student student(s.substr(0,s.find(',')), atoi(s.substr(s.find(',')+1).c_str()));
testStudent[k++] = student;
}
students.close();
(6) ;
ss.sort(testStudent,k);
cout <<"top 30%: "<<endl;
for(k = 0; k < number * 0.3; k++) {
testStudent[k].out();
}
delete []testStudent;
return 0;
}
第2题:
A、three quarters of an hour time
B、three quarter's of an hour time
C、three quarters of an hour's time
D、three quarters'of an hour's time
第3题:
没有如下的用户定义类型:
Type Student
number As String
name As String
age AS Integer
End Type
则以下正确引用该类型成员的代码是( )。 A.Student. name="李明"
B.Dim s As Student
S. name="李明"
C.Dim s As Type Student
S. name="李明"
D.Dim s As Type
S. name="李明
第4题:
第5题:
有以下定义和语句: struct students {int num;char name[20];char c; struct {int grade1;int grade2;}s; }; struct students w,*pw; *pw=w; 下列赋值语句不正确的是( )。
A.w.num=1002;
B.w.grade1=85;
C.pw->num=1002;
D.w.s.grade2=85;
第6题:
The teacher’s words helped the students gain () into the problem.
A、ideas
B、views
C、insight
D、understanding
第7题:
有两张关系表:
Students(SID,SName,Sex,Dept)
Prizing(SID,PName,Type,PDate)
Students表描述的是学生基本信息.Prizing表描述的是学生获奖信息。
①若在应用程序中经常使用如下查询语句:
SELECT S.SID,SName,PName,Type FROM Students AS S JOIN Prizing AS P ON S SID=P.SID
请问能否使用聚集文件提高此查询的性能?并给出原因。
第8题:
( 14 )设有如下的用户定义类型:
Type Student
number As String
name As String
age As Integer
End Type
则以下正确引用该类型成员的代码是
A ) Student.name = " 李明 "
B ) Dim s As Student
s.name = " 李明 "
C ) Dim s As Type Student
s.name = " 李明 "
D ) Dim s As Type
s.name = " 李明 "
第9题:
打开考生文件夹,在STUDENTS子文件夹中创建一个名为WANGLING的子文件夹。
2. 将考生文件夹中的全部以字母A开头的文件复制到子文件夹WANGLING中。
3. 删除STUDENTS文件夹下PENG子文件夹中的testing文件。
4. 将考生文件夹中TEXT文件夹里的test文件的属性设置为“隐藏”和“只读”。
5. 将STUDENTS文件夹下的USER-4子文件夹更名为DINGHONG。
第10题: