Home »
MCQs »
OOPs MCQs
What are Static variables?
54. What are Static variables?
- Static variables are the variables that are visible in specific functions
- Static variables are the variables that speed up the allocation of the CPU
- Static variables are the variables that are defined within a function and retain their values from the previous call
- All the variables are static variables by default
Answer: C) Static variables are the variables that are defined within a function and retain their values from the previous call
Explanation:
Static variables are the variables that are defined within a function and retain their values from the previous call.