Daily Archive: October 8, 2017


Programming In C: Arrays With Pointers

Pointers and arrays are closely related in C.  Using indexes and pointers to access the contents of an array are simply two sides to the same coin.  They offer two perspectives that aim towards the same goal.  With pointer arithmetic (which we covered in the article on pointers), you can access each element in the array one after another or randomly.  With array indexing you can specify a short hand number that is easier to understand and read but does the same thing.