KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What happens to the reference in function parameter, if it gets destroyed when the function returns, then how const int *i is still a valid pointer? const int* func(const int &x = 5) { return &x; } int main() { const int *i = func(); }
Tags (comma-separated)
Save Edits
Cancel