LakshyaEducation.in

VEDIC MATHS Video Series
  • Home
  • Video Series
    • Vedic Maths Videos
    • Quantitative Aptitude Videos
    • Class 8 Maths Videos
    • Class 9 Maths Videos
    • Class 10 Maths Videos
  • Quiz & Solutions
  • Blog
  • Store
  • Login
  • Contact Us
  • Home
  • Topic
  • C++ Programming
  • Objects And Classes

C++ Programming

OBJECTS AND CLASSES MCQs

Total Questions : 23

Page 1 of 3 pages
Question 1.

Which of the following statements are correct for a static member function?

       1. It can access only other static members of its class.

       2. It can be called using the class name, instead of objects.


  1.    Only 1 is correct.
  2.    Only 2 is correct.
  3.    Both 1 and 2 are correct.
  4.    Both 1 and 2 are incorrect.
 Discuss Question
Answer is Option C. -> Both 1 and 2 are correct.

Question 2.

Which of the following is the only technical difference between structures and classes in C++?


  1.    Member function and data are by default protected in structures but private in classes.
  2.    Member function and data are by default private in structures but public in classes.
  3.    Member function and data are by default public in structures but private in classes.
  4.    Member function and data are by default public in structures but protected in classes.
 Discuss Question
Answer is Option C. -> Member function and data are by default public in structures but private in classes.

Question 3.

Which of the following means "The use of an object of one class in definition of another class"?


  1.    Encapsulation
  2.    Inheritance
  3.    Composition
  4.    Abstraction
 Discuss Question
Answer is Option C. -> Composition

Question 4.

Which of the following can be overloaded?


  1.    Object
  2.    Functions
  3.    Operators
  4.    Both B and C
 Discuss Question
Answer is Option D. -> Both B and C

Question 5.

Which of the following statements is correct?


  1.    Data items in a class must be private.
  2.    Both data and functions can be either private or public.
  3.    Member functions of a class must be private.
  4.    Constructor of a class cannot be private.
 Discuss Question
Answer is Option B. -> Both data and functions can be either private or public.

Question 6.

How many objects can be created from an abstract class?


  1.    Zero
  2.    One
  3.    Two
  4.    As many as we want
 Discuss Question
Answer is Option A. -> Zero

Question 7.

Constructor is executed when _____.


  1.    an object is created
  2.    an object is used
  3.    a class is declared
  4.    an object goes out of scope.
 Discuss Question
Answer is Option A. -> an object is created

Question 8.


What does the class definitions in following code represent?



class Bike
{
Engine objEng;
};
class Engine
{
float CC;
};

  1.    kind of relationship
  2.    has a relationship
  3.    Inheritance
  4.    Both A and B
 Discuss Question
Answer is Option B. -> has a relationship

Question 9.

Which of the following statements about virtual base classes is correct?


  1.    It is used to provide multiple inheritance.
  2.    It is used to avoid multiple copies of base class in derived class.
  3.    It is used to allow multiple copies of base class in a derived class.
  4.    It allows private members of the base class to be inherited in the derived class.
 Discuss Question
Answer is Option B. -> It is used to avoid multiple copies of base class in derived class.

Question 10.

Which of the following statements is correct when a class is inherited privately?


  1.    Public members of the base class become protected members of derived class.
  2.    Public members of the base class become private members of derived class.
  3.    Private members of the base class become private members of derived class.
  4.    Public members of the base class become public members of derived class.
 Discuss Question
Answer is Option B. -> Public members of the base class become private members of derived class.

  • 1
  • 2
  • 3
  • Next →
  • Share on Facebook!
  • Share on Pinterest!

Sub Topics

  • Abstract Classes
  • Access Control
  • Argument Passing
  • Arrays
  • Booleans
  • C++ Concepts
  • Catching Exceptions
  • Character Types
  • Class Hierarchies And Abstract Classes
  • Class Hierarchies Introduction
  • Classes
  • Comments And Indentation
  • Complex Number Type
  • Constants
  • Constructors And Destructors
  • Container Design
  • Conversion Operators
  • Declaration
  • Default Arguments
  • Dereferencing
  • Derivation And Templates
  • Derived Classes
  • Design Of Class Hierarchies
  • Enumerations
  • Error Handling
  • Error Handling Alternatives
  • Essential Operators
  • Exception Specifications
  • Exceptions
  • Exceptions And Efficiency
  • Exceptions That Are Not Errors
  • Floating Point Types
  • Free Store
  • Friends
  • Function Call
  • Function Declarations
  • Function Templates
  • Functions
  • Grouping Of Exceptions
  • Header Files Usage
  • Increment And Decrement
  • Integer Types
  • Large Objects
  • Linkage
  • Macros
  • Modularization And Interfaces
  • Multiple Inheritance
  • Namespaces
  • Objects
  • Objects And Classes
  • Oops Concepts
  • Operator Functions
  • Operators
  • Overloaded Function Names
  • Pointer To Function
  • Pointer To Void
  • Pointers
  • Pointers Into Arrays
  • Pointers To Members
  • References
  • Resource Management
  • Run Time Type Information
  • Sequence Adapters
  • Sequences
  • Simple String Template
  • Sizes
  • Specialization
  • Standard Exceptions
  • Standard Library Design
  • Statements
  • String Class
  • Structures
  • Subscripting
  • Template Arguments To Specify Policy Usage
  • Types
  • Uncaught Exceptions
  • Unspecified Number Of Arguments
  • User Defined Types
  • Value Return
  • Vector
  • Void

Recent Posts

  • Quantitative Aptitude Faqs
  • Sail E0 Results 2022
  • Vedic Maths Faq
  • Best Ssc Exam For Girls
  • Sail E0 Exam Results Cancelled - Exam Will Be Rescheduled
  • Is Ssc Difficult Than Upsc?
  • Ssc Exam Guide Book

Recent Questions

Q.   The Enzymes That Catalyze The Reactions Of The Krebs Cycle A....

Q.   IC Counters Are

Q.   Synonym Of PROMULGATE

Q.   ______bridge Measures The Unknown Inductance By Comparing It....

Q.   An Imaginary Number Is One That Exists Only In The Mind Of T....

Q.   The Following System Is Not Generally Used

Q.   Exposure To Chemicals Having Carcinogenic Properties Cause

Q.   Determine Output: Void Main() { Int I=0, J=1, K=2, M; M = I+....

Q.   Sulfanilamide Was Synthesized By Which Of The Following Rese....

Q.   The Personnel Which Deal With The Computer And Its Managemen....

Q.   What Is The Detention Time Considered For The Contact Zone W....

Q.   A, B Can Do A Piece Of Work In 30 Days , While B Can C Do Th....

Q.   Identify The Exact Answer For The Blank (2)?

Q.   Thermosetting Polymers As Compared To Thermoplastic Polymers....

Q.   Where Did Last World Cup Soccer Tournament Took Place (2010)....

Q.   Recently, The Lancet Medical Journal Has Published Its New R....

Q.    what Is The Length Of A Square I Its Perimeter Is 160 Cm. ....

Q.   Which Of These Methods Of Httpd Class Is Used To Read Data F....

Q.   Coolant Present In The Primary Circuit Of A Pressurised Wate....

Q.   What Is The Father Of A Calf Called?

Topics

Computer Aptitude
SAIL Junior Officer (E-0)
10th Grade
11th Grade
12th Grade
4th Grade
5th Grade
6th Grade
7th Grade
8th Grade
9th Grade
NCERT
Cat
Commerce
Computer Science
Engineering
English
General Knowledge
Ias
Management
Quantitative Aptitude
Reasoning Aptitude
General Studies (Finance And Economics)
Vedic Maths
Analytical Instrumentation
Biochemistry
Bioinformatics
Biology
Biotechnology
Bitsat
Business Statistics
C Programming
C++ Programming
Cell Biology
Chemistry
Cost Accounting
Drug And Pharmaceutical Biotechnology
Electrical Measurement And Instrumentation
Environment Management
Environmental Biotechnology
Enzyme Technology
Financial Management And Financial Markets
Gate
General Science
Geography
Heat Transfer
History And National Movements
Human Anatomy And Physiology
Human And Cultural Diversity
Human Resource Management
Indian Economy
Indian Geography
Indian History
Indian Polity
Instrumentation Transducers
International Relations
Life Sciences
Marketing And Marketing Management
Mass Transfer
Mechanics Of Materials
Microbiology
Neet
Professional Communication
Renewable Energy
Sociology
Surveying
Total Quality Management
Uidai Aadhaar Supervisor Certification
Virology
LakshyaEducation.in
Lakshya Education
Bhilai,Chattisgarh,India
Email: admin@lakshyaeducation.in Phone: 07893519977 (WhatsApp)

Quick Links

  • Vedic Maths
  • Quantitative Aptitude
  • Class – IX Maths
  • Class – X Maths
  • Blog

Our Services

  • About us
  • Privacy
  • TOS
  • Refund / Cancellation
  • Contact
  • Affiliate Program
  • Copyright © 2022 All Right Reserved | Lakshya Education     ( )
    Login / Register

    Your Account will be created automatically when you click the below Google or Facebook Login Button.
    •   Login With Facebook
    •  Login With Google
     Login With Email/Password