What if ther was a way to name a certain type, and then use that name across your program? That way, if that particular type needed to be changed, say to be an int instead of a char, you could specify that in one place. Well, that’s where the typedef statement comes in. However, typedef’s can be a mixed bag, if used too much you acquire obfuscation in your code, but if used to little, you may end up having to edit your code in multiple places; or you may end up with code whose purpose is difficult to understand.
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.
Pointers at this point in the article series may seem like more of a pain that a boon, but they are very powerful when it comes to constructing articulate programs. Pointers allow us to pass the memory addresses of specific objects around in our programs, and to modify memory in various places.
In this article we cover the C programming language: where did it come from, how it relates to other languages, what can it do, what doesn’t it do, and the future of the language. C is a powerful language any aspiring programmer would benefit from learning and mastering. Even today, in embedded systems, C is very much employed, and in that personal respect, important to building my robot.