Get premium membership and access questions with answers, video lessons as well as revision papers.
The typeid operator returns a reference to an object of the class type-info that contains type information.
Githiari answered the question on February 6, 2018 at 09:08
- What purpose do the terminate() and unexpected() elements serve in a C++ computer program?(Solved)
What purpose do the terminate() and unexpected() elements serve in a C++ computer program?
Date posted: February 5, 2018. Answers (1)
- Briefly explain how try, catch and throw work together to provide C++ exception handling.(Solved)
Briefly explain how try, catch and throw work together to provide C++ exception handling.
Date posted: February 5, 2018. Answers (1)
- What is a general class and what is its general form in a C++ computer program?(Solved)
What is a general class and what is its general form in a C++ computer program?
Date posted: February 5, 2018. Answers (1)
- What is a generic function and what is its general form in a C++ computer program?(Solved)
What is a generic function and what is its general form in a C++ computer program?
Date posted: February 5, 2018. Answers (1)
- What is the main advantage of run-time polymorphism? What is its potential disadvantage?(Solved)
What is the main advantage of run-time polymorphism? What is its potential disadvantage?
Date posted: February 5, 2018. Answers (1)
- If in a class hierarchy, a derived class neglects to override a virtual function,what happens when an object of that derived class that function in...(Solved)
If in a class hierarchy, a derived class neglects to override a virtual function,what happens when an object of that derived class that function in a computer program?
Date posted: February 5, 2018. Answers (1)
- Is the following C++ fragment correct? If not, why not?
class base {
public:
virtual int f(int a)=0;
//...
};
class derived : public base {
public:
int f(int a, int b) {return...(Solved)
Is the following C++ fragment correct? If not, why not?
class base {
public:
virtual int f(int a)=0;
//...
};
class derived : public base {
public:
int f(int a, int b) {return a*b;}
//...
};
Date posted: February 5, 2018. Answers (1)
- Distinguish between an abstract and polymorphic classes.(Solved)
Distinguish between an abstract and polymorphic classes.
Date posted: February 5, 2018. Answers (1)
- What is a pure virtual function in a computer program?(Solved)
What is a pure virtual function in a computer program?
Date posted: February 5, 2018. Answers (1)
- How does virtual function help achieve run-time polymorphism in a computer program?(Solved)
How does virtual function help achieve run-time polymorphism in a computer program?
Date posted: February 5, 2018. Answers (1)
- Define the term computer system(Solved)
Define the term computer system.
Date posted: February 5, 2018. Answers (1)
- What is a program's virtual function?(Solved)
What is a program's virtual function?
Date posted: February 5, 2018. Answers (1)
- Give one advantage of using the C++ I/O functions instead of the C-like I/O system.(Solved)
Give one advantage of using the C++ I/O functions instead of the C-like I/O system.
Date posted: February 5, 2018. Answers (1)
- What functions report status information about the C++ I/O system?(Solved)
What functions report status information about the C++ I/O system?
Date posted: February 5, 2018. Answers (1)
- Show the statement that sets the put pointer to the 234th byte in a file linked to a stream called 'out'(Solved)
Show the statement that sets the put pointer to the 234th byte in a file linked to a stream called 'out'
Date posted: February 5, 2018. Answers (1)
- What function positions the get pointer and put program pointers?(Solved)
What function positions the get pointer and put program pointers?
Date posted: February 5, 2018. Answers (1)
- Given the following C++ fragment, in what order are the constructor functions called?
class myclass: public A, public B, public C {...(Solved)
Given the following C++ fragment, in what order are the constructor functions called?
class myclass: public A, public B, public C {...
Date posted: February 5, 2018. Answers (1)
- Explain what protected means in programming world.(Solved)
Explain what protected means in programming world.
Date posted: February 5, 2018. Answers (1)
- When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If...(Solved)
When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If the base is inherited as private by the derived class, what happens to its public and private members in computer programming?
Date posted: February 5, 2018. Answers (1)
- Why are the following two overloaded functions in C++ inherently ambiguous?
int f(int a);
int f(int &a);(Solved)
Why are the following two overloaded functions in C++ inherently ambiguous?
int f(int a);
int f(int &a);
Date posted: February 5, 2018. Answers (1)