Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...



C++ Interview Questions
Questions Answers Views Company eMail

What is Copy Constructor?

ABC, Siemens,

5 32803

What is an abstract class?

Siemens,

6 12363

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

HFG, Siemens,

3 13406

What is a virtual base class?

Fidelity, Siemens,

6 25374

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

HP, Infosys, Thyrocare,

23 73927

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

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

14 111262

What and all can a compiler provides by default?

Accenture, HP,

3 16438

What are the different operators in C++?

HP,

3 14429

What is the difference between method and message?

HP,

5 58386

What is difference between initialization and assignment?

HCL, HP, Infosys,

12 65802

when can we use copy constructor?

HP,

6 17436

Describe functional overloading?

HP,

6 12768

Difference between Overloading and Overriding?

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

35 204721

Difference between Operator overloading and Functional overloading?

HP,

10 54013

What is virtual constructor paradigm?

HCL, HP,

5 16493


Un-Answered Questions { C++ }

Please explain the reference variable in c++?

964


Can I create my own functions in c++?

996


What is pair in c++?

960


Is there a sort function in c++?

907


What are guid?

1151


Explain deep copy and a shallow copy?

953


What is a node class in c++?

969


What is a try block?

986


Explain register storage specifier.

930


What is virtual table?

999


What are c++ data types?

1055


Declare a class vehicle and make it an abstract data type.

874


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

2037


What is the this pointer?

1024


What is an object in c++?

1070