Showing posts with label Header. Show all posts
Showing posts with label Header. Show all posts

Saturday, 9 November 2013

Always include the header files when using some standard C libraries

Yesterday, I was working on a C code of mine when I  came across a very peculiar problem. I even wrote a test code to regenerate the problem I was facing.

int main()
{
    char str[10]="3.5";
    printf("%lf",atof(str));
    return 0;
}
This is a simple code I am testing at ideone.com. I am getting the output as