In which memory a class gets stored(in heap /in stack)?
And why??

Answer Posted / pravin

The stack is a place in the computer memory where all the variables that are declared and initialized before runtime are stored. The heap is the section of computer memory where all the variables created or initialized at runtime are stored.
Hence,classes will be stored in heap memory.

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are activex and ole?

755


Explain linear search.

814


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

782


Describe linked list using C++ with an example.

838


What is decltype c++?

727






What is the full form of c++?

869


What does extern mean in a function declaration in c++?

902


What is the difference between C and CPP?

818


What is abstraction c++?

772


Difference between pointer to constant vs. Pointer constant

798


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1232


Who invented turbo c++?

821


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

841


What is c strings syntax?

778


Can constructor be static in c++?

837