Chapter 13

Fun with Text

IN THIS CHAPTER

check Checking for certain characters

check Converting text characters

check Manipulating strings

check Working with conversion characters

check Adjusting text output

check Understanding stream input

A string is a chunk of text. It’s a programming concept but also a basic part of all human communications. What a string isn’t, however, is a variable type in the C language; nope, a string is an array of char variables. This fact doesn’t make it less important. A lot of programming involves presenting text and manipulating strings. So, despite its not being invited to the official C language data type club, the string has lots of clout when it comes to writing programs.

Character Manipulation Functions

At the heart of any string of text is the char variable. It’s a unique cubby hole, into which you stuff an integer from 0 through 255. This value is represented visually as a character ...

Get C Programming For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.