题目内容

写出下列程序的执行结果是:__________________。#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<

#include int add(int a,int b);int main(){int x,y,sum;cout<<"Enter two numbers:"<<'\n';//在下画线处填上语句,完成用cin读入x和y(先输入x,后输入y)_______________sum=add(x,y);cout<<"The sum is:"<

阅读下列程序,写出执行结果。#includeint add(int x,int y){return x+y+1;}double add(double x,double y){return x+y-1;}void main(){int a=2,b=4;double c=2.6,d=7.4;cout<

答案查题题库