Your taylor function doesn't look right to me. Maybe you need to refresh your memory.
Here's my quickly cooked up solution:
Hope this helps.
long factorial( long n )
if( n == 1 )
double exp_maclaurin(double x, int n)
double sum = 1.0;
sum += pow(x,i)/factorial(i);
printf("Our function: exp(5) = %lf\n", exp_maclaurin(5,10));
printf("Built-in exp function: exp(5) = %lf\n", exp(5));