© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
S. DmitrovićModern C for Absolute Beginnershttps://doi.org/10.1007/979-8-8688-0224-9_7

7. Statements

Slobodan Dmitrović1  
(1)
Belgrade, Serbia
 

This chapter explains statements in general – expressions ending with a semicolon (;) and statements built into the language itself.

7.1 Introduction

What is a statement? A statement is an expression ending with a semicolon symbol (;). For example, x + y is an expression, but x + y; is a statement. Let us list a few simple statements we have used so far:
  • int x; – A statement containing a declaration

  • int x = 123; – A statement containing an initialization

  • x = 123; – A simple assignment statement

  • z = x + y; – A statement with ...

Get Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.