Statements and Scope

Learn about statements and blocks in C, as well as about the scope of a variable.

Program statements in C

In the examples of printf statements, variable declarations and variable assignments seen so far, you may have observed the semicolon at the end of several lines. This indicates that the line of code is a program statement in C. Lines 5–6 below are C statements. Line 7 below is also a program statement, a pretty useless one at that, but nonetheless a program statement.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy