单选题
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(x
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<
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<
cout<
cout<
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<
}
答案:
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(m
}
程序运行输出结果:
答案:
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
str++
}
for (i1(i
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
int c0
for(i0i
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
for(int ji+1j
}
}
答案:参数数组中元素进行升序排序
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<
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)户传
《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
该内容是文档的文本内容,更好的格式请下载文档