When declaring a variable in C, what does the 'static' keyword do to the variable's lifetime?
- Doesn't affect it
- Extends it
- Initializes it
- Shortens it
The 'static' keyword in C extends the lifetime of a variable, allowing it to retain its value between function calls, making it suitable for data that persists.
Loading...
Related Quiz
- A function in C returns a value to the calling function using the ________ keyword.
- When dealing with large datasets, what is the advantage of using 'long long int' over 'int'?
- When an array of strings is declared in C, what is it essentially an array of?
- What is the significance of using pointers in function arguments?
- What is the purpose of the strcpy function in C?