Chapter 15

Life at the Command Prompt

IN THIS CHAPTER

check Using a terminal window

check Working with the command line

check Specifying main()’s arguments

check Understanding the exit() function

check Running programs with system()

Before computers went graphical, the text screen was as high-tech as computers went. Visually, everything was plain and dull, and the most exciting computer games involved a lot of reading. If Facebook were invented back then, it would be all book and no face.

Way back when, computer life centered around the command prompt. Directions were typed, and output was plain text. That’s the environment in which the C language was born, and to some extent, where it still exists today.

Conjure a Terminal Window

Whether you’re using Windows, Mac OS X, Linux, or a Unix variant, you can still bring forth a terminal window, in which you can witness the breathtaking starkness of the command prompt. It’s a text-only environment, and, in fact, it’s the environment in which each and every program ...

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.