The keyword ________ is used to declare a variable that retains its value between successive calls to the functions in which it is declared.
- auto
- extern
- register
- static
In C, the static keyword is used to declare a variable that retains its value between successive calls to the functions in which it is declared. This keyword is used to create a local variable with a persistent value, maintaining its state across function calls.
Loading...
Related Quiz
- In an application that writes user data to a text file, what precaution should be taken to avoid data corruption or loss?
- When working with large datasets, using pointers to structures can help in reducing ________ overhead.
- You're developing an embedded system with limited memory and need to define several constants representing the states of a system. Which C construct would be most appropriate to use?
- What is the purpose of using inline functions in C?
- What is the purpose of the fopen function in C?