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 ...
Get C Primer Plus, Fifth 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.