Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Company Name Starts with ...
#  A  B  C  D  E   F  G  H  I  J   K  L  M  N  O   P  Q  R  S  T   U  V  W  X  Y  Z

TCS OOPS Interview Questions
Questions Answers Views Company eMail

is java purely oop Language?

49 37963

What are the OOPS concepts?

106 276268

What is a class?

32 17988

What is encapsulation?

17 14094

What is the difference between pass by reference and pass by value?

12 33647





What are the advantages of inheritance?

26 84234

When will a constructor executed?

5 17303

Can we have a private constructor ?

12 43077

Tell us about yourself.

47 102028

what is virtual function?

26 50525

what is the main difference between c and c++?

386 532152

Definition of Object Oriented Programming in single line?

33 41242

What is the outcome of the line of code "cout< 16 14815


sir plz send me a set of questions that been frequently held in written examination during campus selection.

1207

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

1296

Post New TCS OOPS Interview Questions




TCS OOPS Interview Questions


Un-Answered Questions

How does this impact an it user?

454


How to instantiate static nested classes in java?

245


write a report on 'house path management'.

1281


What is secreted immunoglobulin?

132


What is product attributes?

244






What does a pipe(|) do?

203


What are the different ways of creating thread?

237


What is a font on a computer?

183


10 scenarios for security testing using gmail applications?

6217


Which is better jsp or servlet?

224


What is the difference between direct mail and cold calling? : insurance cold calling

134


What is loop and types?

183


What does the command env do?

233


1)for snapshot replication which agents used? 2)for Transcation replication which agents used? 3)for merge replciation which agents used?

1279


how does the rotating m.m.f is produced in the 3-phase induction motor and how the poles are created in 3-phase induction motor ?

1866