单项选择题
有以下程序
#include <iostream>
int i = 0;
void fun( )
static int i = 1;
std::cout<<i++<<’,’;
std::cout<<i<<’,’;
int main()
fun(); fun();
return 0;
程序执行后的输出结果是
A.1,2,1,2,
B.1,2,2,3,
C.2,0,3,0,
D.1,0,2,0,
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
在面向对象方法中,允许作用于某个对象上的操作称为______。
点击查看答案&解析
单项选择题
有以下类定义 class Point public: Pointint x = 0, int y=0) _x = x; _y = y; void Move int xoff, int yoff) _x +=xoff;_y+=yoff; void Print() const cout<<’(’<<_x<<’,’<<_y<<’)’ << end1; private: int_x,_y; ; 下列语句中会发生编译错误的是
A.Point pt;pt.Print();
B.const Point pt;pt.Print();
C.Point pt;pt.Move(1, 2);
D.const Point pt;pt.Move(1, 2)
点击查看答案&解析
相关试题
与成员访问表达式p->name等价的表达式是...
有如下程序: #include <iostream> u...
下列函数的功能是判断字符串str是否对称,...
在数据库的概念结构设计中,常用的描述工具...
在下面程序的横线处填上适当的内容,使程序...