Question 11
Back to Exercise
How long does a static local variable live?
- A Until the function returns
- B From its first initialization until the program ends Correct
- C Only during the first call
- D Until the next call
Correct Answer: Option B
It is initialized once and keeps its value across calls, but its name is visible only inside the function.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!