You can even open this
math.h
file and look at the prototypes.
This is by no means certain. The C language does not require
that standard library header names correspond to physical files that you can access directly (though usually they do), or
that all declarations required to be provided by a given header are physically present in that header file itself (and often they aren't), or
that if the declarations do appear, their form will be exactly as the book presents (and often they aren't).
Can you help me where can I find the declaration of sin function of math.h file.
On Debian Linux, you're almost certainly using the GNU C library. In its math.h
, you will find some directives of the form
#include <bits/mathcalls.h>
These each bring in the contents of the designated file, expanded according to different sets of macro definitions. The resulting macro-expanded declarations in my copy of Glibc include (reformatted):
extern double cos(double __x) __attribute__ ((__nothrow__ , __leaf__));
extern double sin(double __x) __attribute__ ((__nothrow__ , __leaf__));
extern double tan(double __x) __attribute__ ((__nothrow__ , __leaf__));
extern double pow(double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
Do not concern yourself with the __attribute__
stuff. That's a GNU extension that you don't need to know or care about at this point in your journey.