C++ Static Data Question:
Download Questions PDF

Which of the following are true about static member function?

1. They can access non-static data members
2. They can call only other static member functions
3. They can access global functions and data
4. They can have this pointer
5. They cannot be declared as const or volatile

a. Only 2
b. Only 2,5
c. Only 2,3,4,5
d. Only 2 , 3 , 5
e. All of these

C++ Static Data Interview Question
C++ Static Data Interview Question

Answer:

d. Only 2 , 3 , 5

Download C++ Static Data Interview Questions And Answers PDF

Previous QuestionNext Question
Static variable in a class is initialized when:

a. every object of the class is created
b. last object of the class is created
c. first object of the class is created
d. No need to initialize static variable
Static variable declared in a class are also called_________.

a. instance variable
b. named constant
c. global variable
d. class variable