• Home
  • Interview Questions
  • Online Quiz Tests
  • Blog
  • Contact Us

Global Guideline - Interviewer and Interviewee Guide

Links
  • Home
  • Interview Questions
  • Online Quiz Tests
  • Blog
  • Contact Us
  1. Interviews
  2. C++ Language
  3. C++ Virtual Functions

C++ Virtual Functions Question:

Give example of a pure virtual function in C++?

C++ Virtual Functions Interview Question
C++ Virtual Functions Interview Question

Answer:

class SomeClass {
public:
virtual void pure_virtual() = 0; // a pure virtual function
// note that there is no function body
};


Previous QuestionNext Question
Can you please explain the difference between using macro and inline functions?Tell me can a pure virtual function have an implementation?

Interview Categories:

    • Basic C++ Syntax
    • C++ Access Control
    • C++ COM ActiveX
    • C++ Constructors
    • C++ Containers
    • C++ Exception Handling
    • C++ Friend
    • C++ Inheritance
    • C++ Inline Function
    • C++ New And Delete
    • C++ Operator Overloading
    • C++ Pointers and Functions
    • C++ Programmer
    • C++ References
    • C++ Static Data
    • C++ Template
    • C++ Type Checking
    • C++ Virtual Functions

Most Popular Quiz Categories:

Java AWT And SwingHTMLSQLOOAD (Object Oriented Analysis and Design)SAT (Scholastic Aptitude Test) Sentence CorrectionBiology Aptitude TestStatistics Aptitude TestNetworkingChemistry Aptitude TestManagement

Most Popular Interviews

  • Business and Economy
  • Networking
  • Computer Programming
  • Operating System
  • Computer Hardware

Most Popular Quizzes

  • Information Technology
  • Networking
  • Engineering
  • Accounting
  • Java

Keep in touch with us

 

Copyright © 2007 - globalguideline.com

all rights reserved.
  • About Us
  • Contact Us
  • Blog
  • Terms of use
  • Privacy Policy