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

How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1092

Can union be self referenced?

1145

What is the use of function pointer?

1024

What is lvalue?

1169

What is a unnitialised pointer?

1077

What is endianness?

1096

What is the difference between *p++ and (*p)++ ?

1357

How static variables and local variablesare similar and dissimilar?

1040

What are the uses of typedef in a program?

1083

How to declare an array of pointers to integer?

1140

What do you mean by static variables?

1171

Define pointers?

1040

what do you mean by volatile variable?

1049

What is the difference between global variables and static varables?

1140

Where the memory to the static variables is allocated?

1056


Un-Answered Questions { C++ }

When are exception objects created?

1075


What is the basic difference between C and C++?

1176


What is object in c++ wikipedia?

996


What is the array and initializing arrays in c++?

1030


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

2128


What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?

1056


What is ambiguity in inheritance?

1111


Define a nested class. Explain how it can be useful.

1082


How long does it take to get good at leetcode?

1174


Tell me about virtual function

1194


When not to use object oriented programming?

1100


Explain this pointer?

1067


What is pass by value & reference.

1123


What c++ library is string in?

1053


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

1000