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

Reviewing code structure - C Tutorial

From the course: C Essential Training

Start my 1-month free trial

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…

Contents