Hi All,
Pleas tell me why the following program is giving 35 as output??
if fun() returns int type then it is compilation error. why?
#include<iostream>
using namespace std;
int &fun()
{
static int x = 10;
return x;
}
int main()
{
fun() = 30;
cout << fun();
return 0;
}