It can be visualized as an array of arrays. C program to reverse an array using pointers - Codeforwin The pointer is set to a const char* but the array is set to a char array so that i can change the values in the array. Not only can a pointer store the address of a single variable, it can also store the address of cells of an array. but in 2nd case you, you must know the dimensions of your array, using those dimension you get the lower and upper bound index of the array. C Program To Display Elements of Array In Reverse Order using Pointers By incrementing the value to a pointer to 1, it will start pointing to the next address/ memory location. 4. Arrays: A simple way is to represent the linear relationship between the elements represented using sequential memory locations. Here, ptr is a pointer variable while arr is an int array. How to play with pointers in C. Given an array arr [ARRAY_SIZE] we can get the address of the i -th element by arr + i as arr works as a pointer to the first element of the array. Quzah. Pointer arithmetic. Traverse the array: I have 5 apples. The below snippet shows such a function. Sign in; Join Now; New Post Home Posts Topics Members FAQ. So if acData is an array of character then acData will be the address of its first element. Various ways of accessing arrays. Most faculty at UWB don't want to see pointer arithmetic in your coding. Step I : Repeat For I = LB to UB. Also, we can process entire arrays using loops and pass them to functions. C Program To Reverse an Array Using Pointers