3. What Does This Do? Clarifying Your Code with Comments

In This Chapter

Commenting on your code

Specifying comments

Using whitespace

Applying a second style for your comments

Your computer must be able to understand your programs. Because the computer is a dumb machine, you must be careful to spell C commands exactly right and type them in the order you want them executed. However, people also read your programs. You will change your programs often, and if you write programs for a company, the company’s needs will change over time. You must ensure that your programs are understandable to people as well as to computers. Therefore, you should document your programs by explaining what they do.

Commenting on Your Code

Throughout a C program, ...

Get C Programming Absolute Beginner’s Guide, Third 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.