Write a recursive function to display the digits of an


C++ Assignment

In this assignment you will be writing several functions to practice your skills in writing recursive functions and using stacks/queues.
First, start by writing and testing the following functions:

1. Write a recursive function to display the digits of an arbitrary integer in reverse order. That is, if called with the integer 2364, it would display 4 6 3 2.

2. Write a function that takes in a string and reverses it using a stack. Use an STL stack.

3. Write a recursive function that performs selection sort. Each recursive step should perform another pass on the array.

4. Write a recursive function that performs bubble sort. Each recursive step should perform another pass on the array.

Then, in your main body, test these programs.

1) Read in a number from the user. Call your reverse function and output the integer in reverse.
2) Prompt the user for a string, reverse it with your function and output it to the screen.
3) Create an array of 10 random numbers, display it to the screen, then sort it with your recursive selection sort. Then output the results to the screen.
4) Create a new array of 10 random numbers, display it to the screen, then sort it with your recursive bubble sort and output the results to the screen.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a recursive function to display the digits of an
Reference No:- TGS02273055

Expected delivery within 24 Hours