Sams Teach Yourself C++ in 21 Days

(singke) #1

DAY 13


WEEK 2

Managing Arrays


and Strings


In lessons on previous days, you declared a single int,char, or other object.
You often want to declare a collection of objects, such as 20 ints or a litter of
Cats.
Today, you will learn


  • What arrays are and how to declare them

  • What strings are and how to use character arrays to make them

  • The relationship between arrays and pointers

  • How to use pointer arithmetic

  • What linked lists are


What Is an Array? ................................................................................................


An array is a sequential collection of data storage locations, each of which
holds the same type of data. Each storage location is called an elementof the
array.
Free download pdf