i have defined c & f as float.
once c & f both defined as a float whole expression must be evaluated as a float.
all scientific calculators performs OK with any of three expressions regardless of parentheses.
once c & f both defined as a float, the compiler must treat whole expression as float.
if C or C++ compilers fails to evaluate the value of (5/9) properly, I would not agree to other short-cuts.
How come any scientific calculator evaluates all three expressions perfectly?
C and C++ is perfectly capable of evaluating whatever mathematical algorithms you give it. The onus is on you, as the developer, to use the language correctly to express the algorithm you want.
Scientific calculators presumably do not distinguish between integer values and floating-point values. C and C++, however, are strongly typed languages. If you use integers, then the language will treat them as integers. In the case of 5/9, it will evaluate the result as an integer. If you use 5.0/9.0, it will evaluate the result as a float.
There are clear, deterministic rules for how the language treats different types of quantity, and how it treats situations where mixed types are used. If you're going to use the language, you'd do well to learn that.
One very important thing to understand about C and C++ is: