i am using 'atof' function to convert string into double but it shows the correct value if the string length is 17(max). is ther any function if string length is more than 17?

Does the string represent a valid double value? If not, then you won't find a conversion function that works without first getting a library that supports larger floating point values.

That's only a partial test. A string can contain only digits and still be out of range for the target type. If it's out of range, trying to convert the string to the target type will be undefined.