填空题若有定义语句“int x=10;”,则表达式“x<=10?20:30”的值为【6】。
填空题数据管理技术发展过程经过人工管理、文件系统和数据库系统三个阶段,其中数据独立性最高的是______阶段。
填空题若a. b和C均是int型变量,则表达式a=(b=4)+(c=2)执行后,a的值为______。
填空题在类中声明的静态浮点数的默认初始化值是{{U}} 【8】 {{/U}}。
填空题数据的逻辑结构在计算机存储器内的表示,称为数据的{{U}} {{U}} {{/U}} {{/U}}。
填空题下列程序完成从文件读取文件显示的同时写入第二个文件,则在程序中划线部分应该出现的语句是{{U}} 【14】 {{/U}}。
#include<iostream, h>
#include<fstream, h>
void main()
{
fstream filel, file2;
char fnl [10], fn2[10], ch;
cout<<"输入源文件名";
cin>>fn1;
cout<<"输入目标文件名";
cin>>fn2;
file1. open(fn1, ios :: in);
______
while((ch=file1. get()) ! =EOF)
{
cout<<ch;
file2. put(ch)
}
file1, close()
file2, close();
}
填空题下列软件系统结构图的宽度为________。
填空题利用继承能够实现______。这种实现缩短了程序的开发时间,促使开发人员复用已经测试和调试好的高质量软件。
填空题执行语句序列 intx=10.&r=x: cout<<x<<'-'<<r<<endl; 输出结果为______。
填空题下面程序的运行结果是 【10】 。#include<iostream>using namespace std;class count static int n;public: count() n++; static int test() for(int i=0;i<4;i++) n++; return n; ;int count::n = 0;int main() cout<<count :: test()<<" "; count c1, c2; cout<<count :: test()<<end1; return 0;
填空题在算法正确的前提下,评价一个算法的两个标准是{{U}} 【3】 {{/U}}。
填空题从一个或多个基本表导出的表是一个 【5】 ,它是一个虚表。
填空题将一个函数声明为一个类的友元函数必须使用关键字
________
。
填空题执行“cout.<<char(‘F’,-2)<<end 1;”语句后得到的输出结果为 【3】 。
填空题要在屏幕上显示“Hello,world!”应执行语句cout << 【13】 。
填空题数据结构分为逻辑结构和存储结构,循环队列属于______结构。
填空题使用VC6打开考生文件夹下的工程test39_1,此工程包含一个源程序文件test39_1.cpp,但该程序运行有问题,请改正函数中的错误,使该程序的输出结果为; This is static a: 1 This is non-static b: 1 This is static a: 2 This is non-static b: 2 This is static a: 2 This is non-static b: 1 Press any key to continue 源程序文件test39_1.cpp清单如下; #include<iostream.h> class shared static int a; int b; public: /***************** found *****************/ void set(int i=0, int j) a=i; b=j; void show(); ; /***************** found *****************/ void shared::show() cout << "This is static a: "<< a; cout << "/nThis is non-static b: " << b; /***************** found *****************/ cout >> "/n"; void main () shared x, y; x.set (1, 1); x.show ( ); y.set (2, 2); y.show ( ); x.show ( );
填空题若有以下程序段: #include <iostream> using namespace std; int main() char*p="abcdefgh",*r; long*q; q=(long*)p;q++; r=(char*)q; cout<<r<<end1; return 0; 该程序的输出结果是 【8】 。
填空题根据三角形的基本定理完成填空,则表达式为{{U}} 【8】 {{/U}}。
#include<iostream. h>
#include<math. h>
void main()
{
double a,b,c,s,area;
cout<<"请输入三角形三边a,b,c:"<<end1;
cin>>a>b>>c;
if(______)
{
s=(a+b+c)/2;
area=sqrt(s*(s-a)*(s-b)* (s-c)),
cout<<"三角形的面积为:"<<area;
}
else
cout<<"不能构成三角形!"<<end1;
}
填空题下列函数的功能是{{U}} 【7】 {{/U}}。
#include<iostream. h>
int Func(int a,int b)
{
if (a>b) return 1;
else if(a==b) return 0;
else return -1;
}
