ExamVeda
Login
Home
C plus plus miscellaneous
?

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class class0 
{
    public:
    virtual ~class0(){}
    protected:
    char p;
    public:
    char getChar();
};
class class1 : public class0 
{
    public:
    void printChar();
};
void class1::printChar()
{
    cout  << "True" << endl;
}
int main() 
{
    class1 c;
    c.printChar();
    return 1;
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.