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

How would you use the functions randomize() and random()?

629


Can notepad ++ run c++?

548


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

565


What are smart pointers?

672


What is binary search in c++?

570






What is the first name of c++?

569


How can you quickly find the number of elements stored in a dynamic array?

580


What is c++ prototype?

591


What is c++ similar to?

603


What is const pointer and const reference?

597


What are dynamic type checking?

620


What is namespace std; and what is consists of?

668


How to declare a function pointer?

581


What is oops in c++?

593


Which function should be used to free the memory allocated by calloc()?

594