[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C++ Programming :: OOPS Concepts - Discussion

Home > C++ Programming > OOPS Concepts > MCQs Questions Discussion

10 / 14

Choose the correct option.

Polymorphism is done by

Afunction overloading

BCreating new classes from base class

Coperator overloading

Dboth (a) and (c)

Answer: Option (Login/Signup)

Show Explanation

Compile time Polymorphism: Compile time Polymorphism can be achieved using Function overloading and Operator overloading.

    Function overloading: If a class has multiple functions with same name but with different number of argument or different types of arguments, then these functions are overloaded.

    Operator overloading: Operator overloading means to redefine the way how a operator works. For example, we can overload '+' operator to concatenate two strings in addition to integers.

Run time Polymorphism: Run time Polymorphism in C++ can be achieved using Function overriding. when a derived class has a definition for a member function of a base class then the base version of the method is said to be overridden.

Asked In :: Sopra Steria

Post Your Answer Here:     

Reply    
Rate This: +1 -0 +
    Report


Report Error

Please Login First Click Here