adspace


write a function that reverse the elements of an array in
place.The function must accept only one pointer value and
return void.

Answer Posted / Avinash Kumar Munda

```cppnvoid reverseArray(int arr[], int size) {n for (int i = 0; i < size / 2; i++) {n int temp = arr[i];n arr[i] = arr[size - i - 1];n arr[size - i - 1] = temp;n }n}n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

1271