Question: c++ programing (if you can done it in one hours i will be really thankfull) we can use just char array not a string (mean

c++ programing

(if you can done it in one hours i will be really thankfull)

we can use just char array not a string (mean ascii table using char)

#include #include #include #include #include #include

using std::cin; using std::cout; using std::endl; using std::setw;

the program should written in recursion

Write a function called string_to_int that gets a string that is null terminated (that is, includes beyond the cells used the character '/0' that marks the end of the array segment used) and that is guaranteed to include only digits (ranges 0 to 9) and returns the natural number they make up. It can be assumed that the number represented by the string can be stored in an unsigned int variable. For example: for the string: "9103" the number 9103 will be returned.

Remarks:

A. Do not use any loop command

B. You are allowed to sum the strlen but not any other function on strings.

third. You do not need to check that the string contains only digits. You can assume that.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!