Find and write the output of the following C++ program code : 2
Note : Assume all required header files are already included in the
program.
void Alter(char *S1, char *S2)
{
char *T;
T=S1;
S1=S2;
S2=T;
cout<<S1<<"&"<<S2<<end1;
}
void main()
{
char X[]="First", Y[]="Second";
Alter(X,Y);
cout<<X<<"*"<<Y<<end1;
}
CONTENT QUALITY ANSWER NEEDED
NO SPAM OTHERWISE REPORTED
Answers
Answered by
1
Answer:
Second & First
First * second
Explanation:
as S1 points towards➡X which is equal to First
lly S2 points towards➡Y which is equal to Second
Now, we have to swap
as, *T= First;
S1= Second;
S2= First;
so second point towards➡Y and first point towards➡X
so answer is Second & First
and next part is just put values of X and Y that is First *Second
Similar questions