C++ Interview Questions
Questions Answers Views Company eMail

What is Copy Constructor?

ABC, Siemens,

5 8989

What is an abstract class?

Siemens,

3 4211

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

Siemens, HFG,

2 5575




What is a virtual base class?

Siemens,

6 13617

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

Infosys, HP, Thyrocare,

23 47869

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

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

14 84952

What and all can a compiler provides by default?

Accenture, HP,

3 7428

What are the different operators in C++?

HP,

3 9611

What is the difference between method and message?

HP,

4 28094

What is difference between initialization and assignment?

Infosys, HCL, HP,

12 36987

when can we use copy constructor?

HP,

6 10984

Describe functional overloading?

HP,

6 6432

Difference between Overloading and Overriding?

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

35 166909

Difference between Operator overloading and Functional overloading?

HP,

10 38808

What is virtual constructor paradigm?

HCL, HP,

5 7590







Un-Answered Questions { C++ }

A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

540


what is the drawback of classical methods in oops?

1839


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: "<

550


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

1800


write a program to find 2 power of a 5digit number with out using big int and exponent ?

625


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

2035


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

1020


Give two or more real cenario of virtual function and vertual object

810


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

275


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

930


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

907


What are the general quetions are in DEna bank manager IT/System interviews?

606


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

951


I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.

1027


any one please tell me the purpose of operator overloading

954