Code will exhibit undefined behavio
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(inti) { 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 << '\n'; }
Correct Answer: f(3): Hourly s: Fixed r: Freelancers
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More C++ MCQ Questions