Describe syntax of function returning reference
Answers
Answered by
1
Explanation:
#include <iostream>
using namespace std;
// Global variable
int num;
// Function declaration
int& test();
int main()
{
test() = 5;
cout << num;
return 0;
}
int& test()
{
return num;
}
Similar questions