O'Reilly logo

C Primer Plus, Fifth Edition by Stephen Prata

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 4CHARACTER STRINGS AND FORMATTED INPUT/OUTPUT

You will learn about the following in this chapter:

• Function:

strlen()

• Keywords:

const

• Character strings

• How character strings are created and stored

• How you can use scanf() and printf() to read and display character strings

• How to use the strlen() function to measure string lengths

• The C preprocessor’s #define directive and ANSI C’s const modifier for creating symbolic constants

This chapter concentrates on input and output. You’ll add personality to your programs by making them interactive and using character strings. You will also take a more detailed look at those two handy C input/output functions, printf() and scanf(). With these two functions, you have the program tools ...

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