[Solved] What is the meaning of “res” in C++?


res is the name of a local variable in the function avge that is returned at then end of that function.

// Variable of type float with name "res" is declared
float res;

// Compute some value and assign it to this variable
res = (a+b+c)/3.0;

// Return the variable to the caller
return res;

“res” usually is an abbreviation for “result”.

1

solved What is the meaning of “res” in C++?