填空题
有以下程序:
#include <iostream>
using namespace std;
class sample
int x;
public:
void setx(int i)
x=i;
int putx ()
return x;
;
int main ( )
sample *p;
sample A[3];
A[0] .set>:(5);
A[1] .setx(6);
A[2] .setx(7);
for (int j=0;j<3;j++)
p=&A[j];
cout<<p->putx () <<", ";
cout<<end1;
return 0;
执行后的输出结果是 【14】 。
【参考答案】
E,F,G