in C you can only return a single value from a function as the return value. however the return value can be a struct. so one way to do it would be to declare a struct with the 2 elements you need and return the entire struct.
Code:
struct X {
float a;
float b;
};
struct X function(void) {
struct X r;
r.a = 0.0f;
r.b = 1.0f;
return r;
}
...
struct X x;
x = function();
printf("%f %f\n",x.a,x.b);
the other way is to pass in pointers to the return values you want as arguments and set the values thru the pointers
Code:
void function(float *a,float *b)
{
*a = 0.0;
*b = 0.0;
// no return statement needed
}
...
float x;
float y;
function(&x,&y);
printf("%f %f\n",x,y);