sir plz send me a set of questions that been frequently held in written examination during campus selection.
1525Question 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
1634Post New TCS OOPS Interview Questions
what size steel armoured cable is required to support 1500kva capacity. would 70mm squared be enough or would I need 90 or 120mm squared 3c plus earth
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
What is difference between matrix and grid in sap business one?
What do you mean by “data centre” in cassandra?
What is the purpose of @emailvalidator?
What is transact-sql language?
How does a single acting, spring return ball valve actually work? Does it require continuous air supply?
How can we select suitable capacity generator for three phase load (inductive load) and how to take study analysis in 3 three phase load system ?
multithreading??
What are the important global settings for a company code?
What is the difference between the hash table and hash map?
What is a Message type and Idoc Type?
Which organization has set the de facto standards for project management techniques? A. PMBOK B. PMO C. PMI D. PMA
Difference between zend_registry and zend_session?
What is standard size journal and big end crankshaft in mahindra bolero