C++测试 经典试题及答案
1 . 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题) #define YEAR_SECONDS 365*24*3600
2 . 写一个"标准"宏MIN ,这个宏输入两个参数并返回较小的一个。
#define MIN(x,y) ((x)<(y)?(x):(y))
3. 预处理器标识#error的目的是什么?
答:编译时输出一条错误信息,并中止继续编译。
4. 用变量a给出下面的定义
a) 一个整型数
int a;
b)一个指向整型数的指针
int *a
c)一个指向指针的的指针,它指向的指针是指向一个整型数
int **a;
d)一个有10个整型数的数组
int a[10]
e) 一个有10个指针的数组,该指针是指向一个整型数的。
int *a[10]
f) 一个指向有10个整型数数组的指针
int (*a)[10]
g) 一个指向函数的指针,该函数有一个整型参数并返回一个整型数
int (*a)(int);
h) 一个有10个指针的数组,数组的每个指针指向一个函数,该函数有一个整型参数并返回一个整型数
int (*p[10])(int);
5. 关键字static的作用是什么?
6.全局变量和局部变量有什么区别?是怎么实现的?操作系统和编译器是怎么知道的?
7.下面程序中请列出x,y,z的值
int a[] = {1,2,3,4,5,6,7,8,9};
新加坡EN考试 test C-1... 暂无评价 7页 免费 C++ Test answer 6页 免费 ...6. Please explain the difference of struct and class in the C++ language....
2nd_test_and_answer 8页 1下载券C++ Test...6. Please explain the difference of struct and class in the C++ language....
1 test and answer 暂无评价 30页 20财富值 3 test and answer 暂无评价 25...Payment is to be effected by an irrevocable L/C. 11. 我们相信此货将...
新加坡EN考试 test C-1-a... 暂无评价 7页 免费 c++_test_answer 11页 2...How many constructors are provided in default in the C++ class and please ...
1 test and answer 暂无评价 30页 20财富值 3 test and answer 暂无评价 25...B. C. D. 1.544 Mbps 2.048 Mbps 44.76 Mbps 155.54 Mbps Question ...
1st test and answer 7页 1财富值 4 test and answer 28页 20财富值 3 test...a binary digit used in the binary number system, either 0 or 1 C. th...
C++ Test and Answer 7页 1财富值 C++ Test answer 暂无评价 19页 1财富值...#include <iostream.h> int main() { int a,b,c; int add(int x,int ...
4 test and answer 28页 20财富值 1 test and answer 暂无评价 30页 20财富...A. 1 B. 2 C. 3 D. 4 7. What percentage of bandwidth is available ...
3页 2财富值 test 5 answer 4页 2财富值 2nd_test_and_answer 8页 1财富值 1st test and answer 7页 1财富值 4 test and answer 28页 20财富值喜欢...
1 test and answer 暂无评价 30页 20财富值 3 test and answer 暂无评价 25...L/C and the Parties Involved A letter of credit is a banking mechanism ...
热门文档