C++
Programming and Technical
Programming
Technical
Which of the following statement is correct?
Options
1) A reference is stored on heap.
2) A reference is stored on stack.
3) A reference is stored in a queue.
4) A reference is stored in a binary tree.
Read Solution (Total 1)
-
- 2. Stack- Because we create an object in line 21 and 23, a reference variable will be stored in the block whereas the object will be stored in the heap memory. The reference variable in the Stack refers to the object in the Heap which means the reference variables store the memory address of the object in the Heap.
- 6 years agoHelpfull: Yes(0) No(0)
C++ Other Question