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  3795
Contrast OOP and SOA. What are tenets of each? Wipro   1  4322
why c++ is called OOPS? waht is inherutance? what is compiler?  5  5381
What normal C constructs work differently in C++?  2  1952
Why and when is a virtual destructor needed?  5  7725
Why a "operator=(...)" when there is a copy ctor?  2  2170
what is object slicing? Wipro   9  27034
who is the founder of c++? Hexaware   15  15716
//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  1107
what is an instance of a class  5  2328
What is a class? TCS   32  4487
What is an object? HCL  13  2997
What is the difference between an object and a class?  3  2337
What is the difference between class and structure?  7  3720
What is public, protected, private? Satyam  6  6135
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
 
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 310 TCS
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line. 244 Wipro
Get me a number puzzle game-program 289  
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()? 613 SRA
what is different between oops and c++ 309 IIT
Templates mean 189  
How to call a non virtual function in the derived class by using base class pointer 1162 HCL
to find out the minimum of two integer number of two different classes using friend function 169  
Write a program to reverse a string using recursive function? 332 TCS
What is byval and byref? What are differences between them? 163 Wipro
c++ program to swap the objects of two different classes 137  
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments. 465  
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