ABSTRACT

Strings can be created by putting characters between double quotations. For example, • “Hello” • “The C language” • “write 2 programs” • “symbols $%# can be part of a string” A string can include alphabet characters, digits, spaces, and symbols. The examples

above are string constants, which means that their data cannot be edited. In most cases, however, string variables are preferable to store strings whose values may change. For example, a program may ask a user to enter a name. The program cannot know the user’s name in advance, and thus cannot be compiled with the name. From the program’s point of view, the name is a string variable that gets initialized when it receives the name from the keyboard input.