What is the difference between Pointer and Reference? - ProProfs Discuss
Topics
Products
Follow Us:

What is the difference between Pointer and Reference?

Asked by R. Jones, Last updated: Jul 05, 2020

+ Answer
Request

3 Answers

W. Mocroft

Love to do some charity work. Have a passion for writing and do it in my spare time

W. Mocroft, Philanthropist, Master Degree in International Business, Las Vegas

Answered Aug 29, 2019

A pointer and reference may seem to be the same thing, but these two are different from each other. A pointer can be used when you are trying to create some data structure and also other algorithms. You are going to use references when you are trying to develop some types that will allow you to do some self-documentation. For example, you want to make sure that you will remember a specific paragraph on a page.

A pointer and reference may seem to be the same thing, but these two are different from each other.
You can use a pointer for that. The pointer can also be changed up from time to time. The reference will allow you to compare different sentences that may connect. These tools will allow you to get the information that you are looking for.

 

T. Wikati

T. Wikati, Technical Writer, New York

Answered Aug 06, 2019

A pointer is used to store the memory address of variables. It basically holds the memory of another variable. A pointer is to be dereferenced with an operator to aces the memory location of the variable it points to. A reference on the other hand, is also used to store memory address of existing variables.

A pointer is used to store the memory address of variables. It basically holds the memory of
A reference is alias for an object meaning the second variable shares the same memory address just as the first variable. The second variable can be used to perform task that the first variable can carry out since they have the same memory address.

 

W. Kaye

Here to answer and learn

W. Kaye, Ex-Marine, Post Graduate, Chapel Hill

Answered Jun 13, 2019

Pointer and reference are two important variables which can be used by a compiler in knowing the storage of an item. However, there are many differences between pointer and reference. A pointer is used in storing the memory address of another object or variable. The use of pointers to store the memory address of variables will reduce the problems that are usually encountered by programmers in identifying the needed variables, and this will also enhance the manipulation of those variables.

Pointer and reference are two important variables which can be used by a compiler in knowing the
A pointer is used to represent values for easy manipulation. Reference, on the other hand, is used in storing the memory address of an existing variable. The idea behind the use of reference is that, it offers programmers the opportunity to use the second variable which already shares the same memory address as the first variable. All the contents in the first variable will also be found in the second variable, which means the second variable can be used in performing different operations just as the first variable.

 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.