log function returns natural logarithm (base = e) of a number, where e is the exponential number.
Declaration: double log(double);
C program to find logarithm of a number
double n, result;
printf("Enter a number to calculate its natural logarithm (base = e)\n");
result = log(n);
printf("Natural log of %.2lf = %lf\n", n, result);
Output of program: