我有一份关于C++一些基本Term的试卷,希望大虾能帮忙讲解一下

来源:百度知道 编辑:UC知道 时间:2024/05/15 03:22:02
1. A never-ending loop is________
a. a "for" loop b. a while loop
c. called an infinite loop. d. impossible to exist

2.in C++, all function names are always followed by a pair of ___
a. parentheses() b. square brackets[]
c. angel brackets<> d. a set of curly braces{}

3. a variable that is known to all functions within a file is said to be ____
a. notorious b. worldly
c. famous d. global

4. both a function header and its prototype contain_____
a. the return type b. a coded description
c. actual arguments d. square brackets

5. which of the following is a valid prototype for a functionh that accepts an integer argument and returns a double value?
a. int function(double d); b. int function(int d);
c.double function(int x); d. double function(double x);

6 which of the following correctly calls a function

1.c 讲的是死循环吧
2.a 所有函数名后都有一对括号
3.d 全局变量
4.a 函数返回值类型
5.c 函数返回值类型为double,形参为int
6.b 第一个和第三个形参为int的,就只有b
7. 10 20
25 18
18 20 函数引用型参数,会修改主函数的变量值,反之,不会
8.输出为:94137552.8 是cout吧,没见过cpit,其中,m = 9,n = 4,j = 1,k = 37,a = 5,b = 5,c = 2.8

1 C,2 A,3 D, 4 A ,5 C ,6 B

7:第一次:10 20
第二次:18,20

8:9, 4,1,37,5 ,5 2.8

1、D
2、A
3、D
4、A
5、C
6、B
7、
10 20
25 18
18 20
8、
94137552.8