填空题

若有:
int i=1000;
int *p=&i;
void*q;
q=p;
其中,q=p的含义是______。

【参考答案】

把整型指针p赋值给通用指针q
<上一题 目录 下一题>
热门 试题

填空题
分析以下程序的执行结果______。 #include<iostream.h> class Sample int x,y; public: Sample()x=y=0; Sample(int a,int b)x=a;y=b;) ~Sample() if(x==y) cout<< x=y <<end1; else cout<< x!=y <<end1; void disp() cout<< x= <<x<< ,y= <<y>>end1; ; void main() Sample s1(2,3); s1.disp();
填空题
在下面横线上填上适当的语句,完成程序。 #include<iostream> using namespace std; class TestClass int x; public: TestClass(int i)x=i; ~TestClass() ; class TestClass1:public TestClass public; ______ 完成类TestClassl构造函数的定义 ; int main() TestClass1 0bj(); return 0;
相关试题
  • 有如下类声明: class MyClass int i;...
  • 阅读下面程序: #include<iostream.h>...
  • 下列程序的输出结果是______。 #in...
  • 下列程序的输出结果为: Object id=0 ...