Ask Question

Why do local variables lose their values between calls to the function in which they are

defined?

+5
Answers (1)
  1. 8 November, 21:08
    0
    Variables which are declared within a function are called Local variables. They are named local because they are used locally only means they cannot be used outside the function in which they are declared. These local variables exist in the memory till the function execution starts and are deleted when the execution of function ends. Hence they lose their value between calls to the function in which they are declared.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Why do local variables lose their values between calls to the function in which they are defined? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers