首页 > 试题广场 >

阅读下列程序,写出运行结果: #include usin

[问答题]
阅读下列程序,写出运行结果:
#include<iostream>
using namespace std;
void func( int, int, int * );
int 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;

}


推荐

6, 6, 6

发表于 2018-05-07 11:33:38 回复(0)