最新电大C++语言程序设计期末复习题(本)资料考试小抄


    电C++语言程序设计复题资料参考

    单选题
    1. 定义函数格式类型修饰符 函数名 (形式参数表)函数体中函数体( )
    A基语句 B复合语句
    C空语句 D语句序列
    2.A>B&&A<=B值( )
    Atrue Bfalse
    CA>B 值相 DA<=B值相
    3.实参数( )
    A表达式 B常量
    C变量 D函数调
    4 假定AB类该类拷贝构造函数声明语句________
    A AB&(AB x) B AB(AB x) C AB(AB &x) D AB(AB* x)
    5 结构中定义成员隐含访问权限________
    A public B protected C private D static
    6.fstream流类定义流象开磁盘文件时文件隐含开方
    式________
    A iosin B iosout C iosin | iosout D 没

    7.PC机中运行C++ 语言程序char类型数占    字节
    A1 B2 C3 D4
    8.指出列种基类型错误 B
    Afloat Binteger Cchar Dlong
    9.abc均整型变量表达式a2ba+2c0值   
    A定 B2 C4 D0
    10.设char t’A’表达式5+06+t值数类型   
    Aint Bfloat C确定 Ddouble
    11.    正确if语句
    Aif (x>y) Bif (x y) x+y
    Cif (x y) cin>>x else cin>>y Dif(x12.指数组元素整型维数组指针变量定义   
    Aint *p( ) Bint (*p)( ) Cint *p[4] Dint (*p)[4]
    13.关switch语句break语句描述中正确    
    A break语句循环语句switch语句外语句
    B switch语句中break语句continue语句作相
    C 循环语句中break语句流程跳出循环体提前结束循环
    D 循环语句中continue语句结束次循环终止整循环执行
    14.列关函数定义说法正确   
    A函数定义时嵌套 B函数定义嵌套嵌套调
    C函数main()定义函数 D函数定义嵌套调嵌套
    15.说明语句
    int a[3][4]{234534564567}
    正确数组元素引   
    A*(a+1) B*(a[3]+2) Ca[1]+3 Da[0][0]
    16.定义体类型变量xx占存字节数    (IBM PC机例)
    union data
    { int i
    char ch
    double f
    }x
    A7 B11 C8 D10
    二填空题
    1.应程序TESTCPP中函数函数名称 main
    2.5|65&65^6值分 7 4 3
    3.助变量交换xy两变量值应序执行三赋值语句 xx+y yxy xxy
    4.面语句显示输出8行8列数组h角线元素请补充完整:
    for( i0 i<8 i++)cout<< h[i][i] <<' '
    5.函数return结束运行说明该函数 参 函数
    6.正常执行语句:
    int m[20]*p1&m[5]*p2m+17n
    np2p1
    n值 12
    7.已知' A''Z'ASCII码65—90执行char ch14*5+2cout<8.floatdouble类型长度分 4 8
    9.表达式x=x+l表示成增量表达式 x++
    10.假定p指象值36p+l指象值49*++p值 49
    11.假定访问结构象x中a指针成员指象表示方法 *(x.a)
    12.类中数成员初始化通构造函数中 初始化表 实现通构造函数中 函数体 实现
    13.C++程序中语句间必须 分隔
    14.C++程序中 = 运算符优先级低
    15.C++语言中IBM PC机环境double型数占 8 字节
    16.k int型变量列语句输出 16
    k017
    cout<<++k
    17.表达式 b*b4*a*c>0 判断元二次方式ax2+bx+c0实根表达式
    18.表达式(b10)&&(c0)值 0
    19.已知aASCII十进制代码97表达式10+15227*(a’b’)值 522
    20.C++语言中& 作双目运算符时表示 位 作单目运算时表示 引
    21.函数函数 名 函数 体 两部分构成
    22.C++执行程中检查数组否 越界
    23.C++语言规定调函数时实参数变量形参数变量间数传递
    24.指针变量指针 址
    25.结构体变量中成员引般形式:结构变量名.成员名
    26.写出满足A>BA+B赋Mif语句 if(A>B) MA+B
    27.写出指int型变量指针变量p定义语句: int *p

    三出列程序运行输出结果

    1.#include
    void SB(char ch) {
    switch(ch) {
    case 'A' case 'a'
    cout< case 'B' case 'b'
    cout< case 'C' case 'c'
    cout< default
    cout< }
    cout< }
    void main() {
    char a[6] Abcaf
    for(int i0 a[i] i++) SB(a[i])
    }
    答案:
    well
    good
    pass
    well
    bad

    2.#include
    void main() {
    int a[10] {36254814554072408627}
    int b1 b2
    b1 b2 a[0]
    for(int i 1i<10i++)
    if(a[i]>b1) {
    if(b1>b2) b2b1
    b1 a[i]
    }
    cout< }
    答案:86 72
    3.#include
    void main() {
    int a[8] {357911131517}
    int *pa
    for(int i0i<8i++) {
    *p+10
    cout< if ((i+1) 30) cout< }
    }
    答案:
    13 15 27
    19 21 23
    25 27
    4 #include
    void LE(int* a int* b) {
    int x*a
    *a*b *bx
    cout<<*a<<' '<<*b< }
    void main() {
    int x10 y25
    LE(&x&y) cout< }
    答案:
    25 10
    25 10

    5 #include
    class A {
    int ab
    public
    A() {ab0}
    A(int aa int bb) {
    aaa bbb
    cout< }
    }
    void main() {
    A xy(23)z(45)
    }
    答案:(面四数中间空格)
    2 3
    4 5

    6.#include
    void main()
    {int m3x4y4z7
    m(mm(mm(mcout>>m>>m>>endl>>x>>x>>endl>>y>>y>>endl>>z>>z
    }
    程序运行输出结果:
    答案:
    m7
    x5
    y4
    z8

    7.#include
    void sort(int xint yint z)
    { int t
    if (x>y)
    {txxyyt}
    if(x>z)
    {txxzzt}
    if(y>z)
    {tyyzzt}
    cout>>x>>x>>’ >>y>>y>>’ >>z>>z
    }

    void main()
    { int abc
    cin>>a>>b>>c
    cout>>a>>a>>’ >>b>>b>>’ >>c>>c
    sort(abc)
    cout>>a>>a>>’ >>b>>b>>’ >>c>>c
    }
    假设输入:10 6 8程序运行输出结果:
    参考答案:
    a10 b6 c8x6 y8 z10a10 b6 c8
    8 #include
    void prn str(char *strint mint n)
    { int i
    for (i1i{ cout>>*
    str++
    }
    for (i1(icourt>>*str++
    while(*str)
    { cout>>*
    str++
    }
    cout>>endl
    }

    void main()
    { char *pinformation
    prn str(p34)
    }

    程序运行输出结果:
    答案: **form*****
    四写出列函数功

    1 int Count(double a[] int n) {
    double m0
    int i
    for(i0i mmn
    int c0
    for(i0i if(a[i]>m) c++
    return c
    }
    答案:计算返回参数数组中等参数数组中元素均值元素数
    2 long fact(long n){
    if (n<1L) return 1L
    return n*fact(n1L)
    }
    答案:通函数递调计算返回参数n阶
    3 #include
    void WA(int a[] int n) {
    for(int i0i int ki
    for(int ji+1j if(a[j] int xa[i] a[i]a[k] a[k]x
    }
    }
    答案:参数数组中元素进行升序排序

    4.#include
    #include
    void JB(char* fname)
    fname指字符串作文件标识符文件称fname文件
    假定该文件中保存着批字符串字符串长度均20
    {
    ifstream fin(fname)
    char a[20]
    int i0
    while(fin>>a) {
    cout< i++
    }
    finclose()
    cout< }
    答案:次参数fname指文件中字符输入字符串数组a中输出文件中字符数

    五编程题

    1.设计程序输入整数判断否整数序列325231863441175563中显示该整数序列中序号(注:序号1)否显示0

    答案:
    #include
    int getno(int val)
    {
    int a[]{325231863441175563}
    for(int i0i<10i++)
    if(vala[i]) return(i+1)
    return(0)
    }

    void main()
    {
    int val
    cin>>val
    cout<}

    2编写程序统计输入行字符中数字空格字符分少

    答案:
    #include
    void main()
    {
    int ieng0numb0blan0others0
    char a[100]
    cingetline(a100)
    for(i0a[i]i++)
    {
    if(a[i]<57&&a[i]>48) numb++
    else if(a[i]32) blan++
    else if((a[i]>65&&a[i]<90)||(a[i]>97&&a[i]<97+25)) eng++
    else others++
    }
    cout<cout<}

    38学生学生四门课程成绩存放8行5列二维数组07行14列中编写函数实现:计算学生四门课程总成绩存放该学生行第0列中

    答案:
    #include
    void main()
    {
    int ij
    int a[8][5]{{0}}
    for(i0i<8i++)
    for(j1j<5j++)
    cin>>a[i][j] 输入学生成绩
    for(i0i<8i++)
    for(j1j<5j++)
    a[i][0]+a[i][j] 求学生四门课程总成绩
    }

    请您删容O(∩_∩)O谢谢2015年中央电期末复考试抄全电期末考试必备抄电考试必抄请您删容O(∩_∩)O谢谢2015年中央电期末复考试抄全电期末考试必备抄电考试必抄The battle for young viewers CCTV is embracing Internet culture and working with independent producers on TV shows to woo audiences under 35 Han Bing bin reports After charming audiences with his warm smile for 14 years China Central Television host Li Jiaming recently found himself targeted by a group of young netizens unhappy with his style The complaints came after Li hosted the premiere of Rising Star on Oct 31 It is a singing competition show that originated in Israel Many young netizens found his hosting style slow and boring and mocked it as CCTV evening gala style They even initiated an online campaign to replace him The 40yearold host's reaction to the criticism was surprising During the second episode he jokingly called himself the slow Jiaming and acted much younger talking faster and louder It's like selling a product When the customers file a complaint you must change says Li In the Internet age you get feedback very quickly These young people are so cute When you're willing to change for them they will quickly like you back In order to win more young viewers CCTV is relying on programs such as Rising Star to embrace Internet culture In Rising Star a studio audience and fans watching on television vote for their favorite singers in real time using the instantmessaging app WeChat Rising Star was designed to be a live broadcast but the Chinese version isn't because of policy reasons Still WeChat votes by viewers at home are still a major factor in determining which contestants advance to the next round In the show's latest episode more than 65 million votes were cast via WeChat Now the competition among entertainment shows is very fierce Audiences have more diverse needs CCTV needs to embrace an open attitude interact with young audiences and blend with the Internet says Lyu Yitao director of CCTV's entertainment channel The producer of Rising Star Enlight Media says the program will have a phenomenal effect given CCTV's audience base nationwide But it comes with a challenge says Zhang Hang chief producer of the program and CEO of Enlight Media's TV business Unlike topranking provincial satellite channels such as Hunan TV which have a large base of young fans thanks to a series of phenomenally popular entertainment and reality shows CCTV productions are usually more conservative and serious and thus have a much older audience base If we were to run this program on Hunan we may attract twice as many viewers says Zhang But since we didn't make it there we now have to make the best out of the given conditions And it means we have to make certain compromises When the current season of Rising Star ends Zhang says his company will conduct an overall evaluation of the program and make adjustments for future seasons Although audience ratings haven't lived up to Zhang's expectations he says the program has already helped CCTV attract more young people According to Enlight Media the number of people ages 15 to 35 who watched the first episode of Rising Star was 76 percent higher than the usual audience for CCTV entertainment productions In order to attract young audiences CCTV has been working with independent production companies As one of CCTV's closest partners Enlight Media has produced several entertainment and reality shows for the company's channels including the Chinese version of The Biggest Loser on CCTV's business channel and an original teenager talent show Shaonian Zhongguo-qiang (Strong Young Chinese) on CCTV1 This year CCTV also licensed EEMedia the producer of the popular Super Girl talent shows to produce the talk show Hi 2014 hosted by Taiwan pop star Harlem Yu and one of China's most popular TV stars Xie Na The show is geared toward younger audiences Canxing Productions which rose to fame with the success of its Voice of China series on Zhejiang TV also produced two talent shows for CCTV One is an original production called Songs of China which ended up as one of CCTV's most watched programs of 2014 The State Administration of Press Publication Radio Film and Television announced earlier this year that starting in 2015 only one music talent show can be aired nationwide during prime time each season and there can be only one program based on foreign formats each year However domestic media report that such policies don't apply to CCTV meaning it will become a highly desired platform by production companies Wang Changtian CEO of Enlight Media confirmed to the Shanghai Securities News that its programs scheduled to air on CCTV next year which include at least two reality shows won't be affected A kung futhemed reality show produced by Canxing is also reportedly scheduled to run on CCTV next year CCTV is very active The level of its acceptance of new ideas is even beyond my imagination says Zhang Hang Our cooperation with CCTV will surely continue When winter comes nothing is more relaxing than a hot spring bath For thousands of years natural mineralrich hot spring baths have also been used to relieve health ailments The water found in natural hot springs contains a variety of different minerals and the most common one is sulfur It has a rotten egg smell but is excellent for skin The sulfurcontaining water might be just what the doctor ordered when it comes to relieving pain stress itchy skin arthritis and more Hot springs resorts are thriving as biting cold winter arrives Here we take a look at some of the best natural hot springs China has to offer


    文档香网(httpswwwxiangdangnet)户传

    《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
    该内容是文档的文本内容,更好的格式请下载文档

    下载文档到电脑,查找使用更方便

    文档的实际排版效果,会与网站的显示效果略有不同!!

    需要 15 香币 [ 分享文档获得香币 ]

    下载文档

    相关文档

    2020年电大C++语言程序设计期末考试复习试题及答案(本)

    C++语言程序设计复习题一、单选题1. 在定义函数的格式类型修饰符 函数名 (形式参数表)函数体;中,函数体可以是( )。A、基本语句 B、复合语句C、空语句 D、语句序列2.A>...

    3年前   
    704    0

    电大本科C语言程序设计A期末重点复习考试试题资料小抄

     本科《C语言程序设计A》复习资料小抄一、单选题 1.在每个C语言程序中都必须包含有这样一个函数,该函数的函数名为(A)。 A. main B. MAIN ...

    3年前   
    746    0

    最新电大建筑测量期末重点复习资料考试小抄

    1.什么是水准面、大地水准面?大地水准面有何特性?答:所谓水准面是假想处于静止状态的海水面延伸穿过陆地和岛屿,将地球包围起来的封闭曲面。所谓大地水准面是通过平均海水面的水准面。大地水准面具有唯...

    3年前   
    577    0

    2022年电大C++语言程序设计考试题库及答案

    一、单选题1. 在定义函数的格式类型修饰符 函数名 (形式参数表)函数体;中,函数体可以是( )。A、基本语句 B、复合语句C、空语句 D、语句序列2.A>B&&A<=B的值( ...

    2年前   
    598    0

    电大工程造价专业《工程经济》期末复习题资料考试小抄

    电大《工程经济》期末复习题一、判断正误题1.程建设程序一般经过项目选定、项目准备、项目评价、资金筹措、谈判签约、项目总结等几个阶段。( √ )2.资金等值包括三个因素:资金额大小、资金发生的时...

    3年前   
    445    0

    电大工程数学复习资料(本)期末复习考试试题资料小抄

    电大工程数学复习资料一、 线性代数1、 矩阵的初等行变换:1)两行互换,2)某一行乘以一个非零常数,3)某一行的K倍加到另一行。2、 阶梯型矩阵:1)全为0的行写在最下面,2)首非零元的列标随...

    3年前   
    687    0

    电大机械制图期末考试复习题资料小抄「电大考试必备」

    电大机械制图期末考试复习题资料参考1. 已知△ABC在两条平行线DE、FG所决定的平面内,试完成△ABC的水平投影。由题目已知△ABC在两条平行线DE、FG所决定的平面内,则存在ab与直线de...

    3年前   
    548    0

    c++期末复习资料

    c++期末复习资料1、 面向对象相关概念:类:具有相同属性和行为的对象集合,把数据和操作封装在一起对象:数据+操作。面向对象特征:抽象,封装,继承,多态2、输入输出:输入cin>>a>>b;输...

    10个月前   
    278    0

    电大本科数据结构(本)期末综合练习资料考试小抄

    电大数据结构(本)期末综合练习 期末综合练习一 一、单项选择题1.数据的物理结构( D )。 A.与数据的逻辑结构无关 B.仅仅包括数据元素的表示C.只包括数...

    3年前   
    489    0

    最新版电大组织行为学期末复习资料重点考试小抄

    电大组织行为学期末复习资料考试小抄一、矩阵式连线题(请将下列名词概念和各种描述性语句进行配对,并将正确的匹配结果写在括弧中。四选一 10分)1、A、气质 F、是一种心理活动的动力性特点。B、能...

    3年前   
    676    0

    电大《商务谈判实务》期末复习考试资料小抄「最新」

    电大《商务谈判实务》最新期末复习考试资料小抄一.填空题(每空1分,共10分)1商务谈判涉及 国际商务谈判 与 国内商务谈判 ,而两者又是不同的范...

    3年前   
    847    0

    最新电大《政治经济学》重点期末复习资料考试小抄

    电大《政治经济学》期末考试复习资料小抄一、 配伍题:将名词解释的标号填在名词前的括号里。(每小题 1 分,共 8 分) 进口替代 是指发展本国的工业,用本国生产的制成品代替从国外进口的制成品来...

    3年前   
    581    0

    最新电大专科《水土保持技术》期末复习重点资料考试小抄

    1 水土保持:水土保持是防止水土流失,保护、改良与合理利用水土资源,维护和提高土地生产力,以利于充分发挥水土资源的生态效益,经济效益和社会效益,建立良好生态环境的事业。2 水土保持学研究的内容...

    3年前   
    618    0

    最新电大《金融企业会计》期末重点复习资料考试小抄

    电大金融企业会计复习资料考试小抄一、单项选择题 1.假设会计主体的经营活动将按现在的形式和目标持续不断经营下去,在可以预见的将来不会破产,这样的假设称为( A )。 A.持续经营 ...

    3年前   
    601    0

    面向对象程序设计期末复习题资料

    面向对象程序设计期末复习题一、单项选择题1.对于类中定义的成员,其隐含访问权限为【 B 】 A) public B) private C) static D) protected2.关于...

    10个月前   
    283    0

    电大节水灌溉技术期末复习资料考试小抄

    电大节水灌溉技术复习题考试资料小抄一、选择题:1.可以被人类利用的淡水资源约占全球水的总储量的(0.3% )。2.多雨带气候十分湿润,其年降水量超过(1600 mm)。3.半湿润带气候半湿润半...

    3年前   
    551    0

    电大心理学(本科)期末复习资料考试小抄

    电大心理学复习题(本科)资料一、单项选择题1.突然的敲门声,打断人的思路,属于( B )的干扰。 A.随意注意 B.不随意注意 C.随意后注意 D.注意的动摇2.德国心理学家艾宾浩斯研...

    3年前   
    689    0

    电大土木工程专业《钢结构》期末复习题及答案资料必备小抄

    电大《钢结构》期末复习题资料小抄 一、单项选择题 1.下列关于我国钢结构设计说法正确的一项是 ( C )。A.全部采用以概率理论为基础的近似概率极限状态设计方法 B.采用分项系数表达的极限状...

    3年前   
    566    0

    C++语言程序设计稿件管理数据系统

    XX大学 本科生课程设计(实践)任务书、设计报告 (C++语言程序设计) 题 目 稿件管理数据系统 学生姓名 指导教师 学 院 专业班级 学生学号 计...

    5年前   
    1630    0

    最新电大《西方经济学》(本)期末复习资料题库考试小抄「精编微缩直接打印」

    2015年最新电大《西方经济学》期末复习资料题库考试小抄单项选择题1.供给的变动引起(均衡价格反方向变动,均衡数量同方向变动)2.需求曲线是一条倾斜的曲线,其倾斜的方向为( 右下方 )3....

    3年前   
    537    0

    文档贡献者

    豆***2

    贡献于2020-11-08

    下载需要 15 香币 [香币充值 ]
    亲,您也可以通过 分享原创文档 来获得香币奖励!
    下载文档

    该用户的其他文档