Code:
float c1 = ( f1 - 32 ) / 1.8;
( f1 - 32 ) / 1.8 here is an expression that is evaluated - it's not a function like you'd write in math parlance. c1 doesn't get updated when you modify f1 in line 13, it gets its value at line 9 and that's it.
Like rstanley said - in line 9 c1 will have indeterminate value because f1 has indeterminate value. If you want a function to pass a value into and get a converted value out of, you need to... well, actually make a function. ; )
Code:
float fahrenheit_to_celsi(float fahrenheit) {
// return converted stuff
}
That's not _just_ indeterminate value though. This seems to be straight Undefined Behavior. Address of f1 is never taken, thus it could be declared with register keyword, thus this violates 6.3.2.1:
2 [...] If the lvalue designates an object of automatic storage duration that could have been declared with the register storage class (never had its address taken), and that object is uninitialized (not declared with an initializer and no assignment to it has been performed prior to use), the behavior is undefined.
So, consider yourself lucky that Chaos Demons didn't fly out of your monitor to eat your soul. ; )