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.
Reviewing code structure - C Tutorial
From the course: C Essential Training
Reviewing code structure
- [Instructor] Computer code has a certain look to it. Adhering to familiar methods ensures that your code is readable and understandable to other programmers. So C code runs top down. The first line here is a comment. It's just a note to myself or other programmers. The comment is enclosed with a slash asterisk and asterisk slash characters. This text is ignored by the compiler. It's skipped over as if it wasn't there. Next you see the include preprocessor directive. It tells the compiler to take the IO header file stio.h and insert its code right here. All C code starts with a main function. Like any function, it contains one or more statements, all of which are enclosed in curly brackets or braces. Within the function, braces are also used to enclose a block of statements. At line 11, the four loop statements are enclosed in braces. This block of statements belongs to the loop and these are repeated a given number…
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
-
Challenge: Write your own code1m 5s
-
Solution: Write your own code1m 34s
-
Getting into the C language2m 29s
-
Reviewing code structure2m 56s
-
Working the C development cycle3m 11s
-
Challenge: Find and fix the bugs45s
-
Solution: Find and fix the bugs1m 38s
-
Exploring the preprocessor3m 25s
-
Understanding header files and libraries3m 19s
-
Adding comments2m 39s
-
Challenge: Build the foundation1m 13s
-
Solution: Build the foundation1m 30s
-
-
-
-
-
-