I have declared the function pow
in the traditional way of declaration in C. However, the output of function is incorrect. I don't need to include math.h here as I am declaring the function and the object code for it is already present. Here is my code:
#include<stdio.h>
double pow(); //traditional declaration doesnt work, why??
int main()
{
printf("pow(2, 3) = %g", pow(2, 3));
return 0;
}
The output for the above is 1 whereas it should be 8. Please help me with it.