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;
}
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment