Bifalgorithm post

Let's understand pointers. Now to understand pointers, it's important to understand how memory works. And with memory there's two components, which is the address and the value. And the address is essentially the location and the value is basically the data stored at that location. Now let's say we create an integer variable called x and assign it to the value 5. And when we create this variable, it's going to be stored at address 1000. Now let's say we create another variable called p. Now when we assign the value to p, we're actually going to assign it to the address of variable x which is a thousand. Now this right here is actually what we call a pointer. And a pointer is essentially when you assign the value of a variable to the address of another variable. And we would say it's a pointer because p has the address of x and we can say it's pointing to x, hence the name pointer. And there you have it.

Let's understand pointers. Now to understand pointers, it's important to understand how memory works. And with memory there's two components, which is the addr…

Ideas in this flowchart

  • Understanding Pointers
  • Memory Components
  • Address
  • Value
  • Integer Variable x
  • Value 5
  • Stored at Address 1000
  • Variable p
  • Assigned Address of x
  • Definition of Pointer
  • Pointer Explanation
Feed/

Let's understand pointers. Now to understand pointers, it's important to understand how memory works. And with memory there's two components, which is the address and the value. And the address is essentially the location and the value is basically the data stored at that location. Now let's say we create an integer variable called x and assign it to the value 5. And when we create this variable, it's going to be stored at address 1000. Now let's say we create another variable called p. Now when we assign the value to p, we're actually going to assign it to the address of variable x which is a thousand. Now this right here is actually what we call a pointer. And a pointer is essentially when you assign the value of a variable to the address of another variable. And we would say it's a pointer because p has the address of x and we can say it's pointing to x, hence the name pointer. And there you have it.

"Let's understand pointers. Now to understand pointers"

👍
0
0 comments0 shares

Sign in to view and post comments.