Which of the following feature of OOPs is not used in the following C++ code? class A { int i; public: void print(){cout<<"hello"<<i;} } class B: public A { int j; public: void assign(int a){j = a;} }

Computer - Online Exam Test Papers | Computer - MCQs[multiple choice questions and answers ] | Computer - Mock Test Papers | Computer - Practice Papers | Computer - Sample Test Papers |

Question:
Which of the following feature of OOPs is not used in the following C++ code?

class A
{
    int i;
    public:
    void print(){cout<<"hello"<<i;}
}
 
class B: public A
{
    int j;
    public:
    void assign(int a){j = a;}
}

1.Abstraction

2.Encapsulation

3.Inheritance

4. Polymorphism

Posted Date:-2021-01-31 07:08:04


More MCQS Questions and answers