C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

What is the difference between a pointer and a reference?

0 votes
433 views
asked by anonymous

1 Answer

0 votes
A reference must always refer to some object and, therefore, must always be initialized; pointers do not have such restrictions. A pointer can be reassigned to point to different objects while a reference always refers to an object with which it was initialized.
answered by anonymous

Related questions

+1 vote
2 answers 579 views
0 votes
1 answer 291 views
+1 vote
2 answers 2,327 views
+1 vote
1 answer 99 views
+1 vote
1 answer 2,315 views
...