© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
M. KalinModern C Up and Runninghttps://doi.org/10.1007/978-1-4842-8676-0_1

1. Program Structure

Martin Kalin1  
(1)
Chicago, IL, USA
 

1.1 Overview

This chapter focuses on how C programs are built out of functions, which are a construct in just about all modern program languages. The chapter uses short code segments and full programs to explain topics such as these:
  • Functions as program modules

  • Control flow within a program

  • The special function named main

  • Passing arguments to a function

  • Returning a value from a function

  • Writing functions that take a variable number of arguments

C distinguishes between function declarations, which show how a function is to be called, ...

Get Modern C Up and Running: A Programmer's Guide to Finding Fluency and Bypassing the Quirks 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.