[说明]以下代码实现了对象引用作为函数参数,仔细阅读以下代码,分析运行结果,填入 (n) 处。[代码] #include<iostream.h> class Sample { int x,y; public: Sample() {x=y=0; } Sample (int i, int j ) {x=i; y=j; } void copy ( Sample &s )., void setxy ( int i, int j ) {x=i; y=j; } void print ( {cout<<"x="<<x<<end1 ; cout <<"y="<<y<<end1; }; void Sample: copy ( Sample &s ) { X=S.X; y=s.y; } void func ( Sample s1, Sample &s2 ) { s1.setxy ( 10,20 ); s2.setxy ( 30,40 ); } void main ( ) { Sample p ( 1,2 ) ,q; q.copy ( p ); time ( p,q ); p.print ( ); q.print ( ); } 运行结果 (1) (2) (3) (4)