Vidyalelo
C++ Programming · Q111

Functions and Procedures in C++

Programming · C++ Programming · question 111

Q111

What will be the output of the following C++ code? #include using namespace std; double & WeeklyHours() double h = 46.50; double &hours = h; return hours; int main() double hours = WeeklyHours(); cout << "Weekly Hours: " << hours; return 0;

A.
46.5
Answer
B.
6.50
C.
compile time error
D.
26.5

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board