C++ Interview Questions
Questions Answers Views Company eMail

What is Copy Constructor?

ABC, Siemens,

5 9404

What is an abstract class?


3 4596

What is the difference between creating an object, using 'new' and using 'malloc'?

Siemens, HFG,

2 6021

What is a virtual base class?


6 14264

What is OOPS and How it is different from Procedural Programming ?

Infosys, HP, Thyrocare,

23 48824

Difference between Top down and bottom up approaches for a given project ?

Siemens, Infosys, HCL, CSC, HP, IIT, BSNL,

14 86954

What and all can a compiler provides by default?

Accenture, HP,

3 7917

What are the different operators in C++?


3 9836

What is the difference between method and message?


4 29616

What is difference between initialization and assignment?

Infosys, HCL, HP,

12 38529

when can we use copy constructor?


6 11210

Describe functional overloading?


6 6678

Difference between Overloading and Overriding?

IBM, NIIT, GameLoft, HP, Appnetix Techno, Rohde and Schwarz,

35 168913

Difference between Operator overloading and Functional overloading?


10 39696

What is virtual constructor paradigm?


5 7962

Un-Answered Questions { C++ }

Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer


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.


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<


In what scenario does the Logical file and Physical file being used?


How to call a non virtual function in the derived class by using base class pointer


Prepare me a program for the animation of train


what type of questions


write a C++ program for booking using constructor and destructor.


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;


Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300”,”BullCart : 10”) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side


what is difference between class template and template class?


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?


what are the ways in which a constructors can be called?


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.


Why is it so that we can have virtual constructors but we cannot have virtual destructors?