72 294
Assignments Done
98,8%
Successfully Done
In April 2019

Answer to Question #21724 in C++ for dmitry

Question #21724
This is an test exam question but I can't think of an correct answer.
1)What does the function mystery?
2)Why is there in the declaration of function swap(): **p and **q. explain why.

###CODE###
void mystery(char *w[], int n){
int i,j;
for (i=0;i<n;i++){
for (j=i+1; j<n; ++j){
if (strcmp(w[i],w[j]) > 0){
swap(&w[i],&w[j]);
}
}
}
}
void swap(char **p, char **q){
char *temp;
temp = *p;
*p = *q;
*q = temp;
}
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions