Advertisement

Strings

  • William Buchanan
Chapter
Part of the Macmillan Master Series book series (PMSC)

Abstract

Strings are one-dimensional arrays containing characters. In most cases the number of characters a string has will vary, depending on the input. Thus they must be declared with the maximum number of characters that is likely to occur. Typically they are used to store names. They can also be used when numeric values are entered into a program. With this the program reads the value as a string of characters and then converts it into the required numeric format. This allows the program to determine if the user has entered the value in an invalid numeric format, such as with letters.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© William Buchanan 1998

Authors and Affiliations

  • William Buchanan
    • 1
  1. 1.Department of Electrical and Electronic EngineeringNapier UniversityEdinburghUK

Personalised recommendations