#include using namespace std; double &f(); double val = 100.0; int main() { double x; f() = 99.1; cout << f() << '\n'; return 0; } double &f() { return val; // return reference to val } 99.1