---
title: "Objects_Variables"
date: 2024-06-17
draft: false
---

  
`Programs are collections of instructions that manipulate data to produce a desired result.

```bash
In C++, direct memory access is discouraged. Instead, we access memory indirectly through an object. An **object** is a region of storage (usually memory) that can store a value, and has other associated properties (that we’ll cover in future lessons).
```

Object = store value in memory
Variable = Object that has an identifier

Object - Unnamed object in memory, a variable, or a function. 
But in C++ - Term object doesn't include functions. 

![](/img/Pasted image 20240617203154.png)

```bash
Key insight

Literals are values that are inserted directly into the source code. These values usually appear directly in the executable code (unless they are optimized out).

Objects and variables represent memory locations that hold values. These values can be fetched on demand.
```

`<<` INSERTION
`>>` EXTRACTION 

# assignment 
![](/img/Pasted image 20240617205022.png)
