Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ArrayBackwardPrint(char arr[], int length)
- {
- if (length != 1)
- {
- cout << arr[length - 1];
- char* newArray = new char[length - 1];
- for (int i = 0; i < length - 1; i++)
- {
- char c = arr[i];
- newArray[i] = c;
- }
- ArrayBackwardPrint(newArray, length - 1);
- delete[] newArray;
- }
- else
- {
- cout << arr[0];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment