填空题

在面向对象方法中,允许作用于某个对象上的操作称为______。

【参考答案】

方法
<上一题 目录 下一题>
热门 试题

单项选择题
有以下类定义 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)
单项选择题
下列程序的输出结果是 #include <iostream> using namespace std; int main () char a[] = Hello,World : char*ptr = a; while (*ptr) if(*ptr>= ’a’ &&*ptr <=’z’ cout<<char*ptr+’A’-’a’); else cout<<*ptr; ptr++; return 0;
A.HELLO. WORLD
B.Hello, World
C.hELLO, wORLD
D.hello, world
相关试题
  • 与成员访问表达式p->name等价的表达式是...
  • 有如下程序: #include <iostream> u...
  • 下列函数的功能是判断字符串str是否对称,...
  • 在数据库的概念结构设计中,常用的描述工具...
  • 在下面程序的横线处填上适当的内容,使程序...