Array of Pointers to Strings

Instructor: David Gloag

David has over 40 years of industry experience in software development and information technology and a bachelor of computer science

Manipulating character-based data in computer programs is important as many activities require it. In this lesson, we'll take a look at arrays, pointers and strings, what they are, and when we might use them together.

The Importance of Text

We live in a world where text is often used to convey information. We see it in weather summaries on our favorite television stations, we see it in various storefront advertisements, and we even see it in the messages we receive on our cell phones. It's prominent in our lives. So, it will come as no surprise that the tools we use to manipulate it, in other words computers, have capabilities that allow programmers to accomplish the text-based tasks that come their way. In fact, a number of computer programming languages have features called arrays, pointers, and strings for exactly that.

What is an Array?

In computer programming, an array is an ordered list of homogeneous elements. By homogeneous, we mean elements that are exactly the same in terms of composition, but not necessarily content. For example, consider your grocery list. Each item is an element in the array. Each is a food item. But each isn't necessarily the same - one might be soup, another might be spaghetti. The important part is that we can group them together, and refer to them as a unit (ie: list), and access them by their position in the list (also known as their index).

What is a Pointer?

A pointer is an often-misunderstood concept in computer programming. It is also one of the most powerful concepts you might ever want to have in your toolbox. A pointer is a memory location that provides an indirect reference to another memory location. Think of it like the road signs you see that indicate where to go if you want to go to a specific location, say the airport. The sign doesn't say the airport is here, it gives you a direction to go to find the airport. That is exactly what a pointer does. It is a memory location that contains the physical address of another memory location. It provides indirect access to the destination.

What is a String?

A string is a grouping of characters or text that is meant to be manipulated as a whole or unit. In a number of computer languages (C, C++, C#, Pascal, and Java), they are implemented as arrays of characters, and each character can be accessed individually through its index. For example, the error messages displayed by computer programs are strings, the input prompts are strings, and even a document is a string, albeit a big one. Strings form the basis of text-based computer processing, and will be a significant part of your life if you become a computer programmer.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account