Discussion
Longevity of a variable refers to
Answer: A
Correct answer: The duration for which the variable retains a given value during the execution of a program.
Longevity (or lifetime, or storage duration) is about time - how long the variable’s storage exists and keeps its value. That is a different question from scope, which is about place: the part of the program in which the name is visible. A static local has a short scope but the longest possible lifetime.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development