Explore topic-wise MCQs in Object Oriented Programming Using C++.

This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming Using C++ knowledge and support exam preparation. Choose a topic below to get started.

1.

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

A. className -> staticDataMember;
B. className :: staticDataMember;
C. className : staticDataMember;
D. className . staticDataMember;
Answer» C. className : staticDataMember;
2.

The syntax for defining the static data members is __________

A. dataType className :: memberName = value;
B. dataType className : memberName = value;
C. dataType className . memberName = value;
D. dataType className -> memberName =value;
Answer» B. dataType className : memberName = value;