Initializing "float" with "void"

Hi there. Here is the my code:

void fahrenheitFromCelsius (float cel)
{
    lastTemprature = cel;
    float fahr = cel * 1.8 + 32;
    printf("%f Celsius is %f Fahrenheit.\n", cel, fahr);
}
int main(int argc, const char * argv[])
{
    float freezeInC = 0;
    float freezeInF = fahrenheitFromCelsius(freezeInC);
    printf("Water freezes at %f degrees Fahrenheit.\n", freezeInF);
    printf("The last temprature converted was %f.\n", lastTemprature);
    return EXIT_SUCCESS;
}

My question is: why i can not use “void” to create functions(like in my first line of code) if i want to get value like this:
float freezeInF = fahrenheitFromCelsius(freezeInC);
P.S: When i try it `float fahrenheitFromCelsius(float cel);
So basicly, we can’t use type of float with void,but i don’t know why.Thank you for responding.

That’s because given a function declaration like this:

void foo ();

The declaration says: the function does not return any value.
void means nothing or no value. So foo returns no value.

Therefore, if you do this:

float bar = foo ();

You will get an error from the compiler, saying something along the lines: Initialising float with an expression of incompatible type void.

This is because a variable of type float can be assigned only compatible values; void is not a compatible value for void means no value. Compatible values for float are values of type integer or real.