C++ Interview Questions
Questions Answers Views Company eMail

How to input string in C++

389

If class D is derived from a base class B

289

Define an Abstract class in C++?

494

How to reverse a string in C++

343

How to convert integer to string in C++

366

How to run C++ program in cmd

354

What is bool in C++

358

How to generate random numbers in C++ with a range?

397

Consider the following C++ program

340

Is deconstructor overloading possible? If yes then explain and if no Then why?

1 491

What is the difference between virtual functions and pure virtual functions?

1 591

Can we call a virtual function from a constructor?

1 489

Can we use THIS Pointer in static function – Reason in C++?

328

Factory Method C++ – How to delete pointers returned by it

338

What are issues if we mix new and free in C++?

291


Un-Answered Questions { C++ }

Is there finally in c++?

604


Why can’t you call invariants() as the first line of your constructor?

546


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

598


What are the vectors in c++?

571


When do you call copy constructors?

634






How do you clear a map in c++?

559


What is the full form of india?

554


Explain queue. How it can be implemented?

661


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

988


What do c++ programmers do?

545


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

612


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6471


What is a manipulator in c++?

702


What is the real life example of polymorphism?

597


How does an stl file work?

634