1. >Computer Science
Found 1  QuestionSET DEFAULT
Selected Filters
    Computer Science C++ Virtual Functions and Static Bindi...
Exams
Subjects
Topics

List of top Computer Science Questions on C++ Virtual Functions and Static Binding

What is the output of the following C++ code?

# include <iostream.h>
class Base {
public:
 void show() {cout << "Base"; }
};
class Derived : public Base {
public:
  void show() {cout << "Derived"; }
};
int main() {
  Base* b = new Derived();
  b->show();
}
  • CPET - 2025
  • CPET
  • Computer Science
  • C++ Virtual Functions and Static Binding