>it gives me six errors

And those might be...?
Code:

#include <stdio.h>
enum blas_conj_type {
blas_conj = 191,
blas_no_conj = 192 };
void c_sdot(enum blas_conj_type conj,
int n,
float alpha,
const float *x, int incx,
float beta,
const float *y, int incy,
float *r)
{
int i, ix = 0, iy = 0;
float *r_i = r;
const float *x_i = x;
const float *y_i = y;
float alpha_i = alpha;
float beta_i = beta;
float x_ii;
float y_ii;
float r_v;
float prod;
float sum;
float tmp1;
float tmp2;
if ( n <= 0 )
{
*r_i = 0.0;
return;
}
r_v = r_i[0];
sum = 0.0; /* sum = 0 */
if ( incx < 0 ) ix = (-n+1)*incx;
if ( incy < 0 ) iy = (-n+1)*incx;
for ( i = 0; i < n; ++i )
{
x_ii = x_i[ix];
y_ii = y_i[iy];
prod = x_ii * y_ii; /* prod = x[i]*y[i] */
sum = sum + prod; /* sum = sum+prod */
ix += incx;
iy += incy;
} /* endfor */
tmp1 = sum * alpha_i; /* tmp1 = sum*alpha */
tmp2 = r_v * beta_i; /* tmp2 = r*beta */
tmp1 = tmp1 + tmp2; /* tmp1 = tmp1+tmp2 */
*r = tmp1; /* r = tmp1 */
} /* end c_sdot */
int main(void)
{
float array_a[3] = {1.0F,0.0F,1.0F};
float array_b[3] = {3.0F,3.0F,3.0F};
float result;
c_sdot(blas_no_conj, 3, 1.0F, array_a, 1, 1.0F, array_b, 1, &result);
printf("The answer is %f\n", result);
return 0;
}
/* my output
The answer is 6.000000
*/