| geekocoder (88) | |||
|
can anyone plz explain me the output of the following code Also the output when static keyword is removed
| |||
|
Last edited on
|
|||
| vlad from moscow (3112) | |
|
Function fun returns a reference to an object with the static storage duration. After the statement fun() = 30; variable x defined in the body of func will be equal to 30. Statement cout << fun(); outputs this value on the console. | |
|
|
|