Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/ / functions prototypes static int x = 1 ; int y = x * 2 ; int main ( ) { vector vec 1
functions prototypes
static int x ;
int y x ;
int main
vector vec;
vector vec;
vecswapvec;
int ptr &vec;
y ptr ;
t;
t;
t;
t;
t;
return ;
void t
cout x: x y: y endl;
y ;
x ;
void t
int& x y;
x ::x;
cout x: x y: y endl;
void t
int y x;
static int x ;
cout x: x y: y endl;
x y;
void t
int y x ::x;
int& z ::y;
z ;
cout x: x z y: y endl;
This program outputs lines. What are they?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started