Chapter 5. Standard Input and Output

Working with standard input and output (I/O) is often a requirement for any real-world C application. Although practically all the examples in this book so far have had output (in other words, they printed messages), they have also relied entirely on set values within the code. This is not only boring (apologies for that) but impractical. In this chapter you'll see how to make your applications interactive by taking and responding to user input.

You'll first learn and practice taking a single character input and reacting to that. Next, you'll see how to read in an entire word at a time. Afterwards, the chapter moves on to handling numeric and then multiple inputs. Finally, validating input and more advanced ...

Get C Programming: Visual Quickstart Guide 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.