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
  • C++ Concepts

C++ Programming

C++ CONCEPTS MCQs

Total Questions : 76

Page 1 of 8 pages
Question 1.

In access control in a protected derivation, visibility modes will change as follows:


  1.    private, public and protected become protected
  2.    only public becomes protected.
  3.    public and protected become protected.
  4.    only private becomes protected.
 Discuss Question
Answer is Option C. -> public and protected become protected.


Question 2.

How many constructors can a class have?


  1.    0
  2.    1
  3.    2
  4.    Any Number
 Discuss Question
Answer is Option D. -> Any Number


Question 3.

A template class


  1.    is designed to be stored in different containers
  2.    works with different data types
  3.    generates objects which must be identical
  4.    generates classes with different numbers of member functions.
 Discuss Question
Answer is Option B. -> works with different data types


Question 4.

What is the output of given code fragment?


int f=1, i=2;
while(++i<5)
f*=i;
cout<<f;

  1.    12
  2.    24
  3.    6
  4.    3
 Discuss Question
Answer is Option A. -> 12

Question 5.

A pure virtual function is a virtual function that


  1.    has no body
  2.    returns nothing
  3.    is used in base class
  4.    both A and C
 Discuss Question
Answer is Option D. -> both A and C


Question 6.

Name the header file to be included for the use of built in function isalnum()


  1.    string.h
  2.    process.h
  3.    ctype.h
  4.    dos.h
 Discuss Question
Answer is Option C. -> ctype.h


Question 7.

A static function


  1.    should be called when an object is destroyed
  2.    is closely connected with and individual object of a class.
  3.    can be called using the class name and function name.
  4.    is used when a dummy object must be created.
 Discuss Question
Answer is Option C. -> can be called using the class name and function name.


Question 8.

Which of the following ways are legal to access a class data member using this pointer?


  1.    this.x
  2.    *this.x
  3.    *(this.x)
  4.    (*this).x
 Discuss Question
Answer is Option D. -> (*this).x


Question 9.

Which of the following is not the characteristic of constructor.


  1.    They should be declared in the public section.
  2.    They do not have return type.
  3.    They can not be inherited.
  4.    They can be virtual.
 Discuss Question
Answer is Option D. -> They can be virtual.


Question 10.

If there is a pointer p to object of a base class and it contains the address of an object of a derived class and both classes contain a virtual member function abc(), then the statement 

p->abc();

will cause the version of abc() in the __________class to be executed.


  1.    Base Class
  2.    Derived Class
  3.    Produces compile time error
  4.    produces runtime error
 Discuss Question
Answer is Option B. -> Derived Class

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 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

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)
  • 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

Recent Questions

Q.   In Each Question, The First And The Last Sentences Of The Pa....

Q.   His Death Is A Great Blow, Most Terrible To . . . . . . . .

Q.   Azure Blob Storage Offers How Many Storage Tiers?

Q.   Find Out Whether There Is Any Grammatical Error In Below Sen....

Q.   In Power Point, This Is A Container For Text Or Graphics.

Q.   Symmetric Multiprocessing (SMP) Architectures Are Useful For....

Q.   It Is An Instrument That Entitles The Holder To A Proportio....

Q.   In Each Question Below A Sentence Broken Into Four Or Five P....

Q.   The Playground Of Lawn Tennis Is Called

Q.   How Many Numbers (N) Can We Have, Such That 100<N<1000....

Q.    a Button That Makes Characters Either Upper Or Lower Case ....

Q.    the Area Of A Rectangle Is 45 Cm². If Its Length Is 9 Cm,....

Q.   Which Of The Following Presentation Elements Can You Modify ....

Q.   Di....

Q.   Adversity

Q.   1 U = _______ Nanokatals.

Q.   The Manner In Which Bombs Exploded In Five Trains With In A ....

Q.   Spiny Seeds With Hooks are Dispersed By Animals.

Q.   The Process Of Improving The Cutting Action Of The Grinding ....

Q.   To Meet The Educational Needs Of The People, The Madarasa-I ....

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
  • YouTube Channel
  • Maths Fast Trick
  • 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