int main()
{
printf("%f\n", log(36.0));
return 0;
}
While i compile this code there is an error like..
In function `main':
undefined reference to `log'
why??
Kumar said:
(Wed, Jul 21, 2010 12:53:27 AM)
Since C is a compiler dependent language, it may give different outputs at different platforms. Here the Turbo-C Compiler (Windows) output has been given.
Please try the above programs in Windows (Turbo-C Compiler) and Linux (GCC Compiler), you will understand the difference better.
Well Wisher said:
(Thu, Feb 10, 2011 12:48:46 AM)
Kumar is correct.
Varun said:
(Mon, Apr 4, 2011 09:00:47 AM)
What should be added here (in this case) to make output correct.
Devendra said:
(Sat, Aug 20, 2011 05:00:59 PM)
If we use stdio.h,ans. is -.000901 and using math.h ans is -.001263