not sure about cpp, but in Java it is so... Every derived class
constructor's first line automatically has a call to super()...
Aug 2, 2011 at 2:05 PM, siva viknesh sivavikne...@gmail.com wrote:
how it ll simply call the base class constructor ???
As far as i know .
if we give
Garbage collection is totally JVM dependent... Some JVMs may use a mark and
sweep algorithm.
The first thing u should understand abt Java's garbage collection is totally
unpredicatble. You cant really predict when garbage collection is done. If
and when the JVM decides that garbage coll should be
@Vicky
Piyush's algo is based on a little trick to determine divisibility by 3.
Number of bits set in odd position - Number of bits set in even position 'll
be divisible by 3
For example, take 9. 1001. No. of bits set in odd position - number of bits
set in even position is 0. Hence divisible by
Implementation of smart pointer:
template class T class *auto_ptr*
{
T* ptr;public:
explicit *auto_ptr*(T* p = 0) : ptr(p) {}
*~auto_ptr*() {delete ptr;}
T *operator**() {return *ptr;}
T* *operator-*() {return ptr;}
// ...};
Its