From the course: C Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding comments
- [Instructor] Comments are used for a variety of purposes but in the big picture, a comment is part of your source code that the compiler ignores. It skips over all commented text. The C language uses two styles of comments. The traditional C language comment starts with the slash asterisk character pair. All text that follows is ignored by the compiler until the asterisk slash characters are encountered. You can comment a block of text as shown here between lines one and five or you could comment a single line as shown at line eight. You can even add comments after a statement, which appears here at line 11. The C compiler also understands C++ style comments. This comment starts with two forward slashes and then the comment extends for the rest of the line. This format is for a single line comment only. The purpose for comments is to document your code. The idea is to explain what you're doing to a future version of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Coding your first program3m 18s
-
(Locked)
Challenge: Write your own code1m 5s
-
(Locked)
Solution: Write your own code1m 34s
-
(Locked)
Getting into the C language2m 29s
-
(Locked)
Reviewing code structure2m 56s
-
(Locked)
Working the C development cycle3m 11s
-
(Locked)
Challenge: Find and fix the bugs45s
-
(Locked)
Solution: Find and fix the bugs1m 38s
-
(Locked)
Exploring the preprocessor3m 25s
-
(Locked)
Understanding header files and libraries3m 19s
-
(Locked)
Adding comments2m 39s
-
(Locked)
Challenge: Build the foundation1m 13s
-
(Locked)
Solution: Build the foundation1m 30s
-
-
-
-
-
-