The C math library provides a sine function with the following prototype:
double sin( double x );
The angle 'x' is expressed in radians. You'll find other trigonometric functions in the C math library also; consult the man pages and/or do an online search for more info.
To obtain access to the math library functions, you must do two things. First, #include <math.h> into your source code file; otherwise you'll get a compiler error when you try to invoke sin(). Second, be sure to add the -lm option to your compiler command line so that the math library is included into your build; otherwise you'll get an "unknown symbol" error from the linker.
Sine Example:
#include <math.h>
/*
** Surprisingly, PI is not defined in math.h (if it's a conforming C
** implementation). POSIX provides the M_PI symbol, which has the following
** value.
*/
#define PI 3.14159265358979323846
int main( void )
{
printf( "The sine of pi/4 is %lf.\n", sin(PI/4) );
return 0;
}