Chapter 22. C Programming Basics

Introduction

There are many programming basics that span both C and C++. These basics will be introduced using C language. The upcoming programming sections are only an introduction. They don’t provide enough of information to be used as a reference for the C language. You want to supplement this section with a book dedicated to the C language.

C programs are written in terms of functions. A program will go into functions, execute the logic and leave. Frequently, functions are made up of other functions and statements. Statements are lines of code that carry out a task.

A C program must have a function called main(). The main function is the starting point of all C and C++ programs. Within the main() function is the ...

Get UNIX® User’s Handbook, Second Edition 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.