answersLogoWhite

0

What is reference?

Updated: 12/20/2022
User Avatar

Wiki User

11y ago

Best Answer

A reference is a named memory address, whether a variable or constant. That is, the address-of a named variable is its reference. A pointer variable is a reference that can store a reference. That is, the value of a pointer is a reference. However, while pointers may store a reference to NULL (the value zero, meaning no reference), references can never be NULL. More to the point, a NULL reference will invalidate your program.

Just as you can declare multiple pointer variables to the same reference, you may also declare multiple references to the same name. However, references are not variables in their own right so even though each has its own name they do not require any additional storage beyond the memory they actually refer to, unlike pointers which each require a separate reference of their own in order to store the reference. That is, no matter how many references you declare to the same memory address, there really is only one reference. And because references are not variables, once they've been assigned (always at the point of declaration) they cannot subsequently refer to anything else while they remain in scope. Whereas pointer variables can point to any reference at any time, including NULL.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is reference?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you delete reference of an object in java?

You can't really delete a reference to an object. You can set the reference to null, which will eventually cause the garbage collector to free up the memory from that reference, but you cannot explicitly delete anything.


What is reference plane in PCB design?

Ground (0 v) is reference azlum


What type of reference is C19?

A reference variable is used to refer to or give access to an object. A reference variable is declared to be of a particular type and that type can not be altered.


What is the function of reference voltage?

A: Analogue and digital converters need a reference to weight the input related to the value of the reference. Other applications includes comparator switching and instrumentation


What is forward reference?

Forward reference is a terminology of coding standards. It is in which a variable is used before declaring it.

Related questions

What is the intersection of row 1 and column A referred to?

A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.A1 is the reference to that cell.


Which is correct in reference to or with reference to?

with reference to


A cell reference with a fixed position in the worksheet that does not automatically change based on its location?

An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.An absolute reference. When the formula is copied, the absolute reference will not change.


What is a formula that depends on its own value?

A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.A circular reference. It will cause an error.


What is a reference scenario specially the IEA's reference scenario?

what is Reference scenario


How do you reference a reference within a reference?

To reference a reference within a reference, you would cite the original source you used, followed by "cited in" and then the secondary source where you found the information. Make sure to acknowledge both sources in your references list to maintain academic integrity.


Have complaint reference trains who can you talk to in reference to this matter?

Have complaint in reference to train


F61 is a relative reference or absolute?

F61 is a relative reference in Excel. $F$61 is an absolute reference.


A10 is an example of absolute reference?

No. A10 is a relative reference. $A$10 would be an absolute reference. As a relative reference, it will change when a formula is copied. An absolute reference will not changed in a formula when it is copied.


What is the difference between an area reference and a grid reference?

The difference between and area and grid reference is that an area reference always has 4 numbers, and a grid reference will always have 6 numbers


What type of cells reference is C19?

It is a relative cell reference.


What is the difference between general reference sources and special reference sources?

differentiate general reference sources and special reference sources with example