You are on page 1of 1

Creating a pointer Pointer what is located at specific memory address.

. int total = 5; int *pointer = &total; printf(The total is: %d , <what is the memory address of> pointer); //The * sign means the dereference operator (look at the value located at that memory address in function printf)

Changing data and memory address of a pointer char total = abc123; char *ptr = &total; *ptr = 10; //changes the value of variable total ptr = ptr + 1; //changes the memory address with 1 byte. It is 1 byte because the variable pointer //it is of char type. 1000 : 0110 0001 : A

incrementing

You might also like