C++ Interview Questions
Questions Answers Views Company eMail

What is Copy Constructor?

ABC, Siemens,

5 13170

What is an abstract class?

Siemens,

4 6657

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

Siemens, HFG,

3 8037




What is a virtual base class?

Siemens,

6 17997

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

Infosys, HP, Thyrocare,

23 53844

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

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

14 95806

What and all can a compiler provides by default?

Accenture, HP,

3 10765

What are the different operators in C++?

HP,

3 11022

What is the difference between method and message?

HP,

4 40424

What is difference between initialization and assignment?

Infosys, HCL, HP,

12 46840

when can we use copy constructor?

HP,

6 12340

Describe functional overloading?

HP,

6 7808

Difference between Overloading and Overriding?

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

35 179068

Difference between Operator overloading and Functional overloading?

HP,

10 44348

What is virtual constructor paradigm?

HCL, HP,

5 9988







Un-Answered Questions { C++ }

What is debug class?what is trace class? What differences are between them? With examples.

931


Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation

982


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.

5812


what are the iterator and generic algorithms.

855


How Do you Code Composition and Aggregation in C++ ?

22127






Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.

1595


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1005


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

2750


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

1499


what is the drawback of classical methods in oops?

2250


Program to check whether a word is a sub-string or not of a string typed

986


Get me an image implementation program.

860


what Is DCS ? what i will get benefit when i did?

1165


What is expression parser in c++

1130


Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister

902