C++ Interview Questions
Questions Answers Views Company eMail

What is Copy Constructor?

ABC, Siemens,

5 11958

What is an abstract class?

Siemens,

3 5889

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

Siemens, HFG,

2 7286




What is a virtual base class?

Siemens,

6 17044

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

Infosys, HP, Thyrocare,

23 51918

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

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

14 93620

What and all can a compiler provides by default?

Accenture, HP,

3 9800

What are the different operators in C++?

HP,

3 10569

What is the difference between method and message?

HP,

4 36758

What is difference between initialization and assignment?

Infosys, HCL, HP,

12 44110

when can we use copy constructor?

HP,

6 11906

Describe functional overloading?

HP,

6 7378

Difference between Overloading and Overriding?

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

35 176106

Difference between Operator overloading and Functional overloading?

HP,

10 42927

What is virtual constructor paradigm?

HCL, HP,

5 9187







Un-Answered Questions { C++ }

write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

869


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1221


why reinterpret cast is considered dangerous?

1047


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.

1163


what is c++

949






Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?

2868


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

814


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

906


write a porgram in c++ that reads an integer and print the biggest digit in the number

939


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

2151


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

5000


How connect plc and pc through software

1012


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

2416


Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

1619


How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

1059