adplus-dvertising
frame-decoration

Question

Which among the following is correct syntax to access static data member without using member function?

a.

className -> staticDataMember;

b.

className :: staticDataMember;

c.

className : staticDataMember;

d.

className . staticDataMember;

Answer: (b).className :: staticDataMember;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which among the following is correct syntax to access static data member without using member function?

Similar Questions

Discover Related MCQs

Q. Which data members among the following are static by default?

Q. Whenever any static data member is declared in a class ______________________

Q. If object of class are created, then the static data members can be accessed ____________

Q. Which among the following is wrong syntax related to static data members?

Q. Which among the following is correct definition for static member functions?

Q. The static member functions __________________

Q. The static member functions ____________________

Q. Which is correct syntax to access the static member functions with class name?

Q. Which among the following is not applicable for the static member functions?

Q. Which among the following is true ?

Q. The static members are ______________________

Q. Which among the following is true ?

Q. The static member functions _______________

Q. Which keyword should be used to declare the static member functions?

Q. The keyword static is used _______________

Q. Which among the following can’t be used to access the members in any way?

Q. We can use the static member functions and static data member __________________

Q. The static data member _________________

Q. If static data member are made inline, ______________