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
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
Get step-by-step solutions from verified subject matter experts
