1 8 9 11 12 13 15!16 20 21 23 24 25 26 28 29 31 37 (三道没号的) 27 29 30 31 32 1 2 6 7 无号41 44 45 4 6 7 8 10 12 20 37 无号 30 31 33
1)
下列关于对象概念的描述中,(a)是错误的。
A. 对象就是C语言中的结构变量
B. 对象代
着正在创建的系统中的一个实体
C. 对象是一个状态和操作(或方法)的封装体
D. 对象之间的信息传递是通过消息进行的
2)
#include
#include
void main()
{
cout.fill('*');
cout.width(10);
cout<<"123.45"<分析下面的C++代码段:
class Employee
{
private:
int a;
protected:
int b;
public:
int c;
};
class Director:public Employee{};
在Main()中,下列(c)操作是正确的。
a)
Employee obj;
obj.b=1;
b)
Director boj;
obj.b=10;
c)
Employee obj;
obj.c=3;
d)
Director obj;
obj.a=20;
4)
#include
#define SQR(x) x*x
void main()
{
int a=10,k=2,m=1;
a/=SQR(k+m);
cout<题 了:
#define sqr(x) ( (x) * (x) )本文出自 51CTO.COM技术博客
5)
在C++语言中,下列语句中,正确的是(d)。
a)
void main()
{
cout<