ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
 Categories >> Software >> Programming Languages >> C++ >> OOPS       
Suggest New Category 
 


 

  Question  Asked @ Answers Views     select
 
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization? IntraLogic  1  3822
Contrast OOP and SOA. What are tenets of each? Wipro   1  4359
why c++ is called OOPS? waht is inherutance? what is compiler?  5  5410
What normal C constructs work differently in C++?  2  1954
Why and when is a virtual destructor needed?  5  7747
Why a "operator=(...)" when there is a copy ctor?  2  2173
what is object slicing? Wipro   9  27089
who is the founder of c++? Hexaware   15  15764
//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }  1  1109
what is an instance of a class  5  2334
What is a class? TCS   32  4505
What is an object? HCL  13  3009
What is the difference between an object and a class?  3  2341
What is the difference between class and structure?  7  3726
What is public, protected, private? Satyam  6  6159
E-Mail New Answers        Answer Selected Questions        Post New OOPS Question
Prev     1   [2]    3  ... 7   ... 10   ... 13   ... 16   ... 19   ... 22   ... 25   ... 28   ... 31   ... 34   ... 37    Next
 
 
 
 
 
Un-Answered Questions
 
 Question Views Asked at   Select
 
Get me a number puzzle game-program 291  
Will I be able to get a picture in D drive to the c++ program? If so, help me out? 187  
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 313 TCS
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 216  
can inline function declare in private part of class? 438  
write a programe to calculate the simple intrest and compund intrest using by function overlading 244  
write string class as your own class in java without using any built-in function 342  
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). 283  
How to call a non virtual function in the derived class by using base class pointer 1173 HCL
i am getting an of the type can not convert int to int *. to overcome this problem what we should do? 203  
officer say me - i am offered to a smoking , then what can you say 189  
Plese get me a perfect C++ program for railway/airway reservation with all details. 881  
E-Mail New Answers        Answer Selected Questions
 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com