Check out example codes for "turn a char array into double C". It will help you in understanding the concepts better.

Code Example 1

double toDouble(const char* s, int start, int stop) {
    unsigned long long int m = 1;
    double ret = 0;
    for (int i = stop; i >= start; i--) {
        ret += (s[i] - '0') * m;
        m *= 10;
    }
    return ret;
}

Learn ReactJs, React Native from akashmittal.com