#include <stdio.h>
#include <stdlib.h>
#include <locale.h>

int main(void)
{
const char *tstr[] = { "0.15", "0.12", "0.15723", "5.723" , "10,5"};
size_t n = sizeof tstr / sizeof *tstr, i;
printf("[Output]\n");

// Uncomment one of the following lines to play around with atof and localization
//setlocale(LC_NUMERIC,"de_DE");
//setlocale(LC_NUMERIC,"en_US");
// pick up locale settign from the environment (what we need!)
// from man 7 locale
setlocale(LC_NUMERIC,"");


for (i = 0; i < n; i++)
     printf("\"%s\" -> %g %g\n", tstr[i], atof(tstr[i]), strtod(tstr[i], NULL) );
     return 0;
} 

