C++ Programming - References - Discussion
Discussion Forum : References - General Questions (Q.No. 1)
1.
Which of the following statement is correct?
Discussion:
25 comments Page 3 of 3.
Naresh said:
1 decade ago
In c++ references are stored in stack surely.
When we talk about reference in java, it places Heap area.
When we talk about reference in java, it places Heap area.
Praphulla said:
1 decade ago
Reference is one type of variable stored on stack because of there is need to perform operation on them where object stored on heap.
Valsala shukla said:
1 decade ago
References is like pointers and pointers stores address so I think that's why references are stored on stack.
Saurabh said:
1 decade ago
Actually cpp uses Reference model for user defined data types (like classes, enum etc) , so when a reference is created then actually no object is created in fact reference points to heap object and it is (reference) stored on stack.
Amit said:
1 decade ago
How can we say that, A reference is stored on stack. . ?
I think, Reference has no memory. It just an another name of variable.
Can anyone tell me. . ?
I think, Reference has no memory. It just an another name of variable.
Can anyone tell me. . ?
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers