The program cannot be compiled because there are some problems.
This function cannot work like this
scanf("%d", °)
The curly brackets are missing from deriv2.
float deriv2(float b[], int deg, float x)
{
...
}
Also, c and a are undefined and curly bracketsare missing.
c[j] = a[j] * b[j];
The deriv3() function is also incomplete.
The loop in the deriv function is repeated 1 time too many, resulting in a negative exponent.
for (i = 0; i <= deg; i++) {
ps = pow(x, deg - (i + 1));
The fact that the result could still be correct is due to multiplication by 0.