MCQs > Finance & Management > Excel > What will be the result of calling the h() function in the following C++ code? const char* upwork[] = { 'Freelancers', 'Projects', 'Fixed', 'Hourly } const char* f(int i) { return upwork[i]; } void g(string s){} void h() { const string& r = f(0); g(f(1)); string s = f(2); cout << 'f(3): ' << f(3) << ' s: ' << s << ' r: ' << r <<

Excel MCQs

What will be the result of calling the h() function in the following C++ code?

const char* upwork[] = { "Freelancers", "Projects", "Fixed", "Hourly" }

const char* f(int i) { return upwork[i]; }
void g(string s){}

void h()
{
    const string& r = f(0);
    g(f(1));
    string s = f(2);
    cout << "f(3): " << f(3) << " s: " << s << " r: " << r <<