In the C language, comments start with the /* characters and terminate with the */ pair, the text between which is ignored by the compiler, allowing the programmer to write notes or document code. Though they aren't executable code, comments are important for documentation, making notes, or disabling portions of code for debugging purposes.
- [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 yourself or a colleague who may someday …
- Writing your first C program
- Working the C development cycle
- Adding comments to code for clarity
- C language data types
- Declaring variables
- Making new data types
- Typecasting variables
- Using math, assignment, and logical operators
- Creating for and while loops
- Nesting loops
- Creating functions
- Returning values from functions
- Passing arguments to functions
- Creating recursive functions
Skill Level Intermediate
C: Data Structures, Pointers, and File Systemswith Dan Gookin2h 57m Intermediate
1. The Fundamentals of C
2. Variables and Values
3. Operators and Math
4. Decisions and Loops
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.