C++ Interview Questions
Questions Answers Views Company eMail

Why pure virtual functions are used if they don't have implementation / When does a pure virtual function become useful?

1 533

What is virtual destructors? Why they are used?

1 512

What you mean by early binding and late binding? How it is related to dynamic binding?

1 536

What is meant by reference variable in C++?

1 532

How to create a reference variable in C++

1 537

What are the difference between reference variables and pointers in C++?

1 525

What will the line of code below print out and why?

318

What is the error in the code below and how should it be corrected?

295

What will i and j equal after the code below is executed? Explain your answer.

1 539

What are the different data types present in C++?

1 725

What are class and object in C++?

1 640

Compare compile time polymorphism and Runtime polymorphism

1 479

What do you know about friend class and friend function?

1 537

Define inline function

1 544

What is a reference in C++?

1 623


Un-Answered Questions { C++ }

What does and I oop and sksksk mean?

642


What is virtual destructor ans explain its use?

595


If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?

600


What is the difference between public and private data members?

656


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

600






What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

583


Explain what is oop?

610


What is c++ in english?

570


What is multilevel inheritance explain with example?

619


What is a .h file c++?

526


What are formatting flags in ios class?

602


Define a pointer to a data member of the type pointer to pointer?

566


What do you mean by early binding?

593


Explain the importance of method overloading in C++?

544


What is cin clear () in c++?

601