Donnerwolf1203
3/23/2020 - 3:18 PM

Pointer and References

int* p; // variable p is pointer to integer type
int i; // integer value

int i2 = *p;//dereferencing p

int* p2 = &i; //creating a pointer to i

//Array-stuff:
int a[2]; //array of integers
*a;//the value of the first element of a
a[0];//also the value of the first element of a

*(a+1) == a[1];//the two ways to get the value of the second element

a[i] == *(a + i); // the two ways to get the i-th element