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.
Exploring the preprocessor - C Tutorial
From the course: C Essential Training
Exploring the preprocessor
- [Instructor] The C preprocessor helps prepare a source code file for compiling. It uses preprocessor directives, instructions that are carried out before the source code is compiled to object code. These instructions help compile the source code, and they can provide some handy shortcuts. While they traditionally appear at the start of the source code file. Preprocessor directives can be used anywhere, providing they follow the proper format. They can also be disabled by enclosing them in a comment. The variety of preprocessor directives totals 12, and the most common are define and include. The format of a preprocessor directive is specific, it's different from C language syntax. The directive starts with a hash or pound character. This character is immediately followed by the directive, then comes a space and any options or arguments. A preprocessor directive ends with a new line, not a semi-colon. For the include…
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
-
-
-
-
-
-