STL (140)
OOPS (873)
C++ General (2409) Which is faster post increment or pre increment ? and in which cases should u use either - to increase speed?
4 14352i hav very low percentage in 12th n BSCwhich is around 50.......coz it was just imposed on me 2 b a science graduate,nw m doin MCA n hav aggregate 74% ....what shud i answer if company's HR ask me about dis much low previous percentage??????
3 13974i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????
4 6684if i want cin 12345678910 and cout abcdefghij. so how can i create the program?. example : if i key in 8910 so the answer is ghij.
3 6213sir plz send me a set of questions that been frequently held in written examination during campus selection.
TCS,
2119Write a program that read 2o numbers in and array and output the second largest number. Can anybody help??
7 11150In 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.
GE,
5 8671Consider a c++ template funtion
template
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
TCS,
2185what is the size of this class class size { public: char data1; double d; int data2; char data3; double data4; short data5; }; please explain the padding for these double variables.
9 11808In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?
2 7673How to execute business logic for only once ..?even though user clicks submit button multiple times by mistake..? (i disabled JavaScript)
1 3408
. 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 abstraction in c++?
What is const pointer and const reference?
Can I run c program in turbo c++?
Do vectors start at 0?
Explain the use of vtable.
Explain what happens when an exception is thrown in C++.
How do you achieve runtime polymorphism?
Can I learn c++ in a week?
What are friend classes? What are advantages of using friend classes?
I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.
What are c++ files?
What is the insertion operator and what does it do?
What is late binding c++?
What is the use of endl in c++ give an example?