what is lifetime of variables? explain with example.
Answers
Answered by
3
The scope of a declaration is the part of the program for which the declaration is in effect. The lifetime of a variable or object is the time period in which the variable/object has valid memory. Lifetime is also called "allocation method" or "storage duration."
Similar questions