2022年四川省内江市全国计算机等级考试C语言程序设计测试卷含答案
2022年四川省内江市全国计算机等级考试C++语言程序设计测试卷(含答案)学校:________ 班级:________ 姓名:________ 考号:________一、1.选择题(10题)1.
2022年四川省内江市全国计算机等级考试 C++语言程序设计测试卷(含答案) :________ :________ :________ :________ 学校班级姓名考号 1.(10) 一、选择题题 1. char aint bfloat cdouble d 若有以下定义::;;;则表达式 a*b+d c______ 的值的类型为。 A.float B.int C.char D.double 2. '*'( )int i=100 while(1) {i-- 下列语句段将输出字符的个数为。;; if(i==0) break cout'*' } ;<<; A.98 B.99 C.100 D.101 个个个个 3.() 在数据库系统的组织结构中,下列 映射把用户数据库与概念数 据库联系了起来。 A./ B./ C./ D./ 外模式模式内模式外模式模式内模式内模式模式 4. #include iostream using namespace std; class 若有以下程序:<> Base {public: Base () {x=0; }int x; }; class Derivedl :virtual public Base {public: Derivedl () {x=10; }}; class Derived2 : virtual public Base {public: Derived2 () {x=20; }}; class Derived : public Derivedl,protected Derived2{ }; int main () {Derived obj; coutobj .xend1; return 0; }( ) <<<<该程序运行后的输出结果是。 A.20 B.30 C.10 D.0 5. () 编译时的多态性可以通过使用获得。 A. B. C. D. 虚函数和指针重载函数和析构函数虚函数和对象虚函数和

