Given the following program
#include <iostream>
using namespace std;
void f( int , int & );
void g();
int x = 10;
int main()
{
int x = 88, y = 50;
cout << "x before = " << x << ",y before = "
<< y << endl;
f( x, y);
cout << "x after f = " << x << ",y after f =
"<< y << endl;
g();
g();
cout<<" x = "<<::x<<endl;
return 0;
}
void f ( int x, int& y)
{
x ++;
y ++;
cout << " x in f= "<< x << ", y in f = "
<< y << endl;
}
void g( )
{
static int x = 10;
cout << " x in g = "<<x<< endl;
x++;
}
Given the following program #include using namespace std; void f( int , int & ); void g(); int x = 10; int ma
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Given the following program #include using namespace std; void f( int , int & ); void g(); int x = 10; int ma
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!