In which memory a class gets stored(in heap /in stack)?
And why??
Answers were Sorted based on User's Feedback
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 |
Answer / ravi.g
Usually class will get stored when the object/s are created.
Class will get sored in stack segment when the object is
created inside the functions.
When objects are created globally they will get stored in
the data segment.
Is This Answer Correct ? | 2 Yes | 3 No |
Explain selection sorting. Also write an example.
What is a Default constructor?
Write a program to find the reverse Fibonacci series starting from N.
Should a constructor be public or private?
What is const in c++?
diff between pointer and reference in c++?
What is format for defining a structure?
What is c++ similar to?
What issue do auto_ptr objects address?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
i want the NIC programmer-B model papaer pattren, iwant the all model papers?
Memory is not a constraint. In a single iteration(NOTE: you can't go back), how will you find out the 10th last node/item in a linked list.
16 Answers BNB, FDS, Goldman Sachs, Nagarro,