Trying to understand pointers

>trying to understand pointers

Attached: crying-pepe-gun.jpg (486x486, 27K)

They point to things.

>trying to understand pointers

Attached: 1482242346887.png (1280x1483, 41K)

>try to understand for loops

Attached: angry_pepe.jpg (900x900, 65K)

Dumb frogposter.

Dumb frogposter.

>Trying to understand command line

Attached: 1510354833668.jpg (227x222, 6K)

So you've got niggers that needs to be hanged at the farm. Now we all know that niggers are loud and smelly so it's no good trying to transport a lot of niggers.

What if you could give your address to the farm and they come out and hang your niggers as needed.

>trying to understand all these dubs

Attached: bateman.jpg (1080x810, 120K)

int x = 2;
int y = x;
x = 3;
System.out.println(x + " = " + y )
//3 = 2

Attached: 1521592169708.gif (618x894, 21K)

I used to have trouble with them before I went to university.

Dumb frogposter.

>trying to understand Jack-in-the-box menu

Attached: flat,800x800,075,f.jpg (800x732, 65K)

Memory (RAM) contains a lot of data. A pointer variable "points" to information in a specific part of memory.

Dumb frogposter.

Int hello = 3
Int * p = hello

What does it mean?

Segmentation fault.
It should be:
int hello = 3;
int* p = &hello;

>Trying to understand memory

Attached: 2bc2d5893987119e71bec8ae355a1b99.jpg (1000x1000, 162K)

Lmao they point to things like ????? What's hard to understand about that, LMAOing @ ur life

But where are the pointers stored then?

p holds the address of hello,
hello holds the value of 3

In RAM.

>limit my programming to assembler on the PIC16F88
>never have to worry about pretentious abstractions like pointers

Attached: aoGP0Plw1_480w_v1.jpg (438x437, 26K)

on the stack with everything else unless you allocate memory from the heap or your compiler does it for you

wrong you nigger

but what If I had a pointer on the stack pointing to a pointer in the heap pointing BACK TO THE STACK AND MAYBE ITS ALSO A POINTER TOO!?!?!?!?

your right

not a segfault, p is never dereferenced in that snippet (if it was, there would be a segfault)

instead the compiler will complain about there not being a cast

Stack is stored in RAM.

In the second memory channel. Pointers are the reason why 2-channel memory exists.

You have your home at some address, so does your neighbor next to you and so on

When purchasing something online, you don't uproot your entire fucking house and take it to the store, you give them the address which POINTS to where your house is

You add an item to the stack that points to a location in the heap. Imagine it is tied together with a string. When you need to find something in the messy heap you start at the stack and pull on the thread. That's how pointers work: a reference held in the stack that _points_ to something kept in the heap.

a variable that holds the address of another variable

brainlet detected
real programmers dont require shitty anal ogies to understand pointers

>Stack
>Heap

Attached: plush.jpg (1920x1206, 244K)

>trying to understand while loop
don't come to Jow Forums tomorrow

Attached: 1490850828925.png (700x700, 270K)

No, cache is stored in RAM. Pointers are stored in cache

>variables that point to a memory address or another variable
Literally a variable in a fucking variable, you mong.

See this closet? that's how the memory actually works.
Except inside each box you have a byte, and when you allocate a variable on your favorite programming language, all it does is to plaster a sticker over the boxes with the variable name.

Attached: pointers.jpg (1357x822, 300K)

>not showing a circuit diagram of a flip-flip to explain how memory werks

Attached: 1525842046436.jpg (600x800, 98K)

In RAM each byte has an index, which is just a number. A byte stores a number. A variable is a byte somewhere in RAM. Thus, a variable can store a number and has an index. Because index is just a number variables can store indexes - such a variable is a pointer. There's no difference at the hardware level - the only difference is in how you treat these numbers in your program.

What if he's using ring memory?

>trying to understand futures and promises
I find OS and low-level C hacking easier than JS and frontend.

>desu trying to understand how an analog adder and subtractor worked made me drop an intro to EE course
I've never felt more retarded and enlightened than in that class. Read Charles Petzold "Code"

Both your sentences are wrong. Cache isn't stored anywhere, it's a part of the CPU. Pointers are stored in RAM, either on the stack or in heap. Cache just mirrors parts of RAM for faster access.

BEAUTIFUL

Brainlets itt

Attached: 670px-User-Completed-Image-Defend-Against-a-Ram-2015.05.29-16.55.01.0.jpg (670x444, 50K)

>needing 3 years and an undergrad degree to understand 1st semester comp sci

i think we've identified the real brainlet.