Vidyalelo
C++ Programming · Q31

Functions and Procedures in C++

Programming · C++ Programming · question 31

Q31

What is the purpose of the 'static' keyword in a C++ function?

A.
Declares the function as a member of a class
B.
Prevents the function from being called recursively
C.
Defines the function to be inline
D.
Retains the variable's value between function calls
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board