Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

You must login to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

mcqoptions.com

mcqoptions.com Logo mcqoptions.com Logo

mcqoptions.com Navigation

  • Home
  • About Us
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Contact Us
Home/Philosophy
  • Recent Questions
  • Most Answered
  • Answers
  • No Answers
  • Most Visited
  • Most Voted
  • Random

mcqoptions.com Latest Questions

Chand Krishna
Chand Krishna
Asked: 3 years agoIn: Inheritance

Differentiate between public and protected visibility in context of Object Oriented Programming giving suitable examples for each.

Philosophy
  • 0
  • 1
  • 8
  • 0
Qabool Raj Jhaveri
Qabool Raj Jhaveri
Asked: 3 years agoIn: Inheritance

Discuss various reasons that support the concept of inheritance in Object Oriented Languages.

Philosophy
  • 0
  • 1
  • 8
  • 0
Madhu Mehrotra
Madhu Mehrotra
Asked: 3 years agoIn: Inheritance

What is inheritance? Discuss its various forms.

Philosophy
  • 0
  • 1
  • 8
  • 0
Naseer Sarna
Naseer Sarna
Asked: 3 years agoIn: Inheritance

Consider the following and answer the questions give below: class MNC

{

char Cname[25];  //Compay name

protected:

char Hoffice[25];  //Head office

public:

MNC();

char Country[25];

void EnterData();

void DisplayData();

};

class Branch:public

MNC 

{  long NOE //Number of employees

char Ctry[25];  //Country

protected:

void Association();

public:

Branch();

void Add();

void Show();

};

class Outlet:public Branch

{

char State[25];

public: Outlet();

void Enter();

void Output();

};

(i) Which class’ constructor will be called first at the time of declaration of an object of class Outlet?

(ii) How many bytes does a object belonging to class Outlet require?

(iii) Name the member function(s), which are accessed from the object(s) of class Outlet.

(iv) Name the data member(s), which are accessible from the object(s) of class Branch.

Philosophy
  • 0
  • 1
  • 8
  • 0
Hina Kaur
Hina Kaur
Asked: 3 years agoIn: Inheritance

When does ambiguity arise in multiple inheritance? How can one resolve it? What are virtual base classes? What is their significance?

Philosophy
  • 0
  • 1
  • 7
  • 0
Gulzar Chahal
Gulzar Chahal
Asked: 3 years agoIn: Inheritance

Discuss a situation in which the private derivation will be more appropriate as compared to public derivation

Philosophy
  • 0
  • 1
  • 6
  • 0
Aarti Azhar Verma
Aarti Azhar Verma
Asked: 3 years agoIn: Inheritance

What will be the output of the following program? 

#include<iostream.h>

class Student

{

public:

Student (char pname[]=” “)

{

strcpy(name,pname);

average=semesterHours=0;

}

void addCourse(int hours,float grade)

{

average=(semesterHours*average+grade); semesterHours+=hours;

average=semesterHours;

}

int hours()

{ return semesterHours; }

float gpa()

{ return average;

}

protected:

char name[40];

int semesterHours;

float average;

};

class GradStudent:public Student

{

public:

GradStudent(char pname[]=” “):Student(pname)

{ qual_grade=0;

}

int qualifier()

{ return qual_grade; }

protected:

int qual_grade;

};

int main() { Student commerce(“Saurabh 7/.”); 

GradStudent gs;

commerce.addCourse(4,2.5);

gs.addCourse(4,3.0);

return 0;

}

Philosophy
  • 0
  • 1
  • 6
  • 0
Nishtha Kannan
Nishtha Kannan
Asked: 3 years agoIn: Inheritance

Write a C++ to read and display information about employees and managers. Employee is a class that contains employee number, name, address ad department. Manager class contains all information of the employee class and a list of employees working under a manager. 

Philosophy
  • 0
  • 1
  • 5
  • 0
Mukul Zahir Balakrishnan
Mukul Zahir Balakrishnan
Asked: 3 years agoIn: Inheritance

Create the following class hierarchy in C++.

Philosophy
  • 0
  • 1
  • 5
  • 0
Kim Chaudhari
Kim Chaudhari
Asked: 3 years agoIn: Inheritance

Answer the questions (i) to (iv) based on the following: 

class FaceToFace

{

char CenterCode[10];

public:

void Input( );void Output( );

};

class Online

{

char website[50];

public:

void SiteIn( ); 

void SiteOut( );

};

class Training: public FaceToFace, private online

{ 

long Tcode; 

loat charge;

int period;

public:

void Register( );

void show( );

};

(i) Which type of inheritance is shown in the above example?

(ii) Write names of all the member functions accessible from Show( ) function of class Training.

(iii) Write name of all the member accessible through an object of class Training.

(iv) Is the function Output( ) accessible inside the function SiteOut( )? Justify your answer?

Philosophy
  • 0
  • 1
  • 5
  • 0
Load More Questions

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 393k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Aditi Dugal

    How to approach applying for a job at a company ...

    • 7 Answers
  • Raghavan Prasad Hayer

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Ankita Dinesh Biswas

    What is a programmer’s life like?

    • 5 Answers
  • 47e0c
    47e0c added an answer Correct Answer - Increasing the yield of animals and improving… November 12, 2022 at 9:56 am
  • b6699
    b6699 added an answer Sender\'s addressDateReceivers name and addressSubjectContentYours faithfullyName November 12, 2022 at 9:56 am
  • 10eb8
    10eb8 added an answer Any uncertinity in measurment is known as errorDifference in true… November 12, 2022 at 9:56 am

Top Members

Trending Tags

Class 11 Parabola Polity Polynomials Probability Projectile Protists Quadrilaterals Rario Reasoning Sampling Social Solutions Spectroscopy Switchgear Thermodynamic Tourism Transients Upsc Wbjee

Explore

  • Home
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Tags
  • Badges
  • Users

Footer

mcqoptions.com

About

MCQOptions.com

Here are the top interview questions, example answers, tips for giving the best response.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Terms of Use
  • Privacy Policy
  • Cookie Policy

Follow

© 2022 MCQOptions. All Rights Reserved