填空题
下面程序的运行结果为
【13】
。
#include <iostream.h>
void main()
unsigned char value=127;
int total=100;
value++;
total+=value;
cout<<total<<end1;
A) 227
B) 100
C) 127
D) 27
【参考答案】
4 10
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
如果一个函数模板声明列出了多个参数,则每个参数之间必须使用逗号隔开,每个参数都必须重复使用关键词 【12】 。
点击查看答案&解析
填空题
有如下程序: #include <iostream> using namespace std; class shapes protected: int x,y; public: void setvalue(int d, int w=0) x=d; y=w; virtual void disp()=0; ; class square : public shapes public: void disp() cout<<x*y<<end1; ; int main() shapes *ptr; square s1; ptr=&s1; ptr->setvalue(10,5); ptr->disp(); return 0; 执行上面的程序将输出 【14】 。
点击查看答案&解析
相关试题
下面函数的功能是( )。 int fun(char...
有以下程序: #include <iostream> u...
有以下程序: #include <iostream> u...
下列类的定义中,有( )处语法错误。 cl...
类MyClass的定义如下: class MyClass p...