#include #include #include int main( int argc, char * argv[] ) { double d; /* variable to hold converted number */ char *restPtr; /* pointer variable to hold rest pointer */ errno = 0; d = strtod( argv[1], &restPtr ); if (errno) perror("ERROR in strtod"); printf( "Conversion of the string \"%s\"\n", argv[1] ); printf( " * produces the double value ``%.2g''\n", d); printf( " * and leaves the remainder string \"%s\"\n", restPtr ); return 0; }