So, what is a program?
Now that you have built and run your first program, let’s take a quick look inside to see how it works.
A program is a collection of functions. A function is a list of operations for the processor to execute. Every function has a name, and the function that you just wrote is named main.
When programmers talk about functions, we usually include a pair of empty parentheses. Thus, the main function is referred to as main().
There was another function in your program – printf(). You did not write this function, but you did use it.
To a programmer, writing a function is a lot like writing a recipe card. Like a function, a recipe card has a name and a set of instructions. The difference is that you execute ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access