What functions are a static variable visible to?

Nguyễn Tân

New member
What functions are a static variable visible to?
A. Only Static Functions
B. All Types of Functions
C. Only Functions with a return type
D. Only Non Static Functions
 
Answer: A
Explanation: The static keyword makes the variable only visible to one function. The data held by static variables is not erased when the function call is over. This is what differentiates any static variable with a non-static variable.
 

Tìm kiếm

Back
Top