写出下列程序的执行结果是:__________________。#includeusing namespace std;void func( int *, int *, int *& ) ;void main(){ int a=10, b=20; int *p=&a, *q=&b; func( p, q, p ); cout << "*p=" << *p << ",*q=" << *q << endl;}void func( int *t1 , int *t2 , int *& rt ){ *t1 += 5 ; *t2 += 5 ; rt = t1 ; *rt += 5 ; }
查看答案
写出下列程序的执行结果是:__________________。#includeusing namespace std;void func( int, int, int & );void main(){ int x=0 , y=1 , z=2; func( 1 , 2 , x ); func( x + y , y , y ); func( z , x + y , z ); cout << x << "," << y << ","<< z << endl ;}void func( int a , int b , int &c ){ b += a ; c = b - a ; }
写出下列程序的执行结果是:__________________。#includeusing namespace std;void func( int, int, int * ) ;void main(){ int x, y, z; func( 5, 6, &x ); func( 7, x, &y ); func( x, y, &z ); cout << x << "," << y << ","<< z << endl;}void func( int a , int b , int *c ){ b += a ; *c = b - a ; }
写出下列程序的执行结果是:__________________。#includeusing namespace std;#includeint f( int ) ;void main(){ int i; for( i = 0; i < 3; i ++ ) { cout << f( i ) ; if(i!=2) cout<<","; }}int f( int a ){ int b = 0 , c = 1; b ++; c++; return int( a + pow( double(b), 2 ) + c );}
写出下列程序的执行结果是:__________________。#includeusing namespace std;void func(int a, int b, int c = 3, int d = 4 );void main(){ func( 12, 12 );}void func( int a, int b, int c, int d ){ cout<