O'Reilly logo

Programming Techniques Through C: A Beginner's Companion by M. G. Venkateshmurthy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7

Characters and String Handling

Handling characters and sequences of characters with computers is one of the very important activities. Sequences of characters are generally referred to as strings. In C, strings are written within a pair of double quote marks (“) and are stored in the form of character arrays with a null character (\0) as it 's last element. This null character will be automatically inserted by the C compiler. For example, “World Cup” is a string and is stored as shown in the following figure.

images

We have been using character arrays or strings right from the very first example to display messages along with the printf()

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required