why is strtof is always evaluating to HUGE_VAL?

Posted by bstullkid on Stack Overflow See other posts from Stack Overflow or by bstullkid
Published on 2010-06-02T17:29:11Z Indexed on 2010/06/02 17:34 UTC
Read the original article Hit count: 202

Filed under:

What could be the issue here? It doesn't matter what number I choose for str, it is always 26815615859885194199148049996411692254958731641184786755447122887443528060147093953603748596333806855380063716372972101707507765623893139892867298012168192.00

char *str = "2.6";
printf("%f\n", strtof(str, (char**)NULL));
//prints 26815615859885194199148049996411692254958731641184786755447122887443528060147093953603748596333806855380063716372972101707507765623893139892867298012168192.00

© Stack Overflow or respective owner

Related posts about c