Answer to Question #5828 in C++ for Kewal

Question #5828
Write a function that takes a double array name and an array size as arguments and that swaps the first and last value in that array.
1
Expert's answer
2012-01-05T08:09:10-0500
void swap(double arr[], int n){
& double a;
& a = arr[0];
& arr[0] = arr[n-1];
& arr[n-1] = a;
}

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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS