C++ Interview Questions
Questions Answers Views Company eMail

Write about c++ storage classes?

744

How the delete operator differs from the delete[]operator?

640

What do you understand by pure virtual function? Write about its use?

577

Explain the concept of dynamic allocation of memory?

617

In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

584

What do you understand by zombie objects in c++?

609

How the programmer of a class should decide whether to declare member function or a friend function?

680

Using a smart pointer can we iterate through a container?

556

Should the this pointer can be used in the constructor?

551

We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

576

When should I use unitbuf flag?

586

What is the difference between prefix and postfix versions of operator++()?

591

What is the difference between an array and a list?

584

How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

637

When should overload new operator on a global basis or a class basis?

608


Un-Answered Questions { C++ }

What is the full form of c++?

613


Which format specifier is used for printing a pointer value?

573


Do the names of parameters have to agree in the prototype, definition, and call to the function?

599


Show the declaration for a pointer to function returning long and taking an integer parameter.

572


State two differences between C and C++.

605






Which is better c++ or java?

562


Why are pointers used?

578


What do you mean by enumerated data type?

570


What are exceptions c++?

590


What is an iterator?

684


C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.

383


Can member functions be private?

591


What are two types of polymorphism?

607


What are virtual constructors/destructors?

576


Discussion on error handling of C++ .

642