Chapter 15
Life at the Command Prompt
IN THIS CHAPTER
Using a terminal window
Working with the command line
Specifying main()’s arguments
Understanding the exit() function
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access