更多“____可以删除由#define定义的宏,使之不再起作用。”相关的问题
第1题
C++提供的预处理命令有嵌入指令、条件编译指令和____。
点击查看答案
第2题
下面程序三次调用同一函数sum,在下划线处填上适当内容,使输出结果为: S=2 5=5 S=9 #include <iostream> using namespace std; void sum(int i) { static int s; (1____); cout << "s=" << s << end; } void main(void) { int 1; for (1 = 0; (2____)) sum(i); }
点击查看答案
第3题
在#include命令中所包含的头文件,可以是系统定义的头文件,也可以是____定义的头文件。
点击查看答案
第4题
一个函数带有参数说明时,参数的默认值应该在____中给出。
点击查看答案
第5题
在下面程序下划线处填上适当内容,使程序执行结果为: 200________100 #include <iostream> using namespace std; Template(1____) T f(T x, T y){ if (sizeof(T) == (2____)) return x + y; else return x*y; } void main() { cout << f(10, 20) << "--" << (45.5, 54.5) << endl; }
点击查看答案
第6题
请写出程序的输出结果。 #include < iostream> using namespace std; void f2____ { int z = x; x = y; y = z; } void main____ { int x = 10, y = 26; cout << "x, y=" << x << "," << y << endl; f2____; cout << "x, y=" << x << "," << y << endl; x++; y--; f2____; cout << "x, y=" << x << "," << y << endl; }
点击查看答案
第7题
在下划线处填上适当字句,完成求最大值函数模板的定义。 #include <iostream> using namespace std; template <typename t> T Max(T x, T y) { return(x>y ? x : y); } (1____)); } void main() { int x; double y; x = Max(5, 6); y = Max(12.3, 3.4, 7.8); cout << "x=" << x<"y="<y<end1;>
点击查看答案
第8题
阅读下列程序,并写出输出结果。 #include<iostream> using namespace std; int f(int); void main(){ int i; for (i = 0; i<3; i++) cout f(i) "____"; endl; } int f(int a) { b="0;" static c="3;" b++; c++; return(a + c);>
点击查看答案
第9题
请写出程序的运行结果。 include<iostream> using namespace std; int f____ { int c; if ____ c = l; else if ____ c = 0; else c = -1; return ____; } void main____ { int i = 2, j = 3; int p = f____; cout << p << endl; }
点击查看答案
第10题
阅读下列程序,并写出输出结果。 #include<iostream> using namespace std; int min____{ return a
点击查看答案