adplus-dvertising

Welcome to the Class Members MCQs Page

Dive deep into the fascinating world of Class Members with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Class Members, a crucial aspect of Object Oriented Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Class Members, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Object Oriented Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Class Members. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Object Oriented Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Class Members. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Class Members MCQs | Page 1 of 9

Q1.
What is the term used to indicate the variable and constants of a class?
Discuss
Answer: (a).Data members
Discuss
Answer: (b).Can be initialized only with help of constructors
Discuss
Answer: (d).Static data members are defined outside class, not in constructor
Discuss
Answer: (a).The structure must have been defined before class.
Q5.
How many data members can a class contain?
Discuss
Answer: (d).As many as required
Discuss
Answer: (c).Dot or arrow as required
Discuss
Answer: (a).Return the address of the private data member using a member function
Discuss
Answer: (d).Considered a red flag, and not recommended for large scale use
Q9.
What is the output of following code?
int n=10;  // global
class A()
{
 private : int n;
 public : int m;
 A()
 { 
  n=100; m=50;
 }
void disp()
{
 cout<<”n”<<m<<n;
};
Discuss
Answer: (d).n50100
Q10.
The static member functions can only use ________
Discuss
Answer: (a).Static data members
Page 1 of 9

Suggested Topics

Are you eager to expand your knowledge beyond Object Oriented Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!