Object oriented programming

sir,
i want to know that what kind of memory is allocated for data members of class {stack memory or the heap memory} on it’s own.??

The memory for any data or object that are used in a user defined function are always allocated in the stack. This is to ensure that the object is destroyed as soon as the function is returned. Also this ensures that the correct memory allocation and destruction is performed.