A pointer is a value that designates the address (i.e., the location in memory), of some value. Pointers are variables that hold a memory location. There are four fundamental things you need to know about pointers: How to declare them (with the address operator ‘&‘: int *pointer = &variable;) How to assign to them (pointer = NULL;) How to reference the value to which the pointer points (known as dereferencing, by using the dereferencing operator ‘*‘: value = *pointer;) How they relate to arrays (the vast majority of arrays in C are simple lists, also called “1 dimensional arrays”). Pointers
The post How to reverse an array in-place using pointers appeared first on Coding Security.
How to reverse an array in-place using pointers
read more
Tidak ada komentar:
Posting Komentar