# Reference Types

Reference types, unlike value types, don’t store their values directly within the variables themselves.&#x20;

They store the address of the situation where the worth is stored. The variable holds the pointer to a different memory location that holds the particular data.

### **Passing by reference**

* Both the variables are pointing to the same address location. Both the variables will share the same values and change committed by one is reflected in the other variable.
* When a reference type variable is assigned to another variable or when a reference type variable is sent as an argument to a function, EVM creates a new variable instance and copies the pointer from the original variable into the target variable.&#x20;

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://calnix.gitbook.io/eth-dev/compendium/solidity-basics/reference-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
