C How to Program, with an introduction to C++.
- Introduction to C Programming: Fundamentals of the C programming language, including basic syntax, data types, and simple I/O operations.
- Structured Program Development in C: Algorithms, pseudocode, and control structures like selection and iteration statements for structuring C programs.
- C Program Control: Focuses on iteration essentials, including the use of
for
,while
, anddo...while
loops, as well asif
,if...else
andswitch
statements.
- C Functions: Modularize programs using functions, covering function prototypes, arguments, header, storage classes, scope, and recursion.
- C Arrays: Arrays definition, manipulation, character arrays, arrays of functions, multidimensional and variable length arrays.
- C Pointers: Pointers definition,
const
type qualifier, principle of least privilege, pointer arithemetic,sizeof
operator, arrays of pointers, function pointers and array of pointers to functions.
- C Characters and Strings: String handling and character functions in C, including string manipulation, comparison, search and memory functions.
- C Formatted Input/Output: Conversion specifiers for
printf
andscanf
.
- C Structures, Unions, Bit Manipulation, and Enumerations: Definitions of structures and unions in C, type definitions, bit manipulation techniques, bit fields, and enumeration constants.
- C File Processing: File handling in C, including creating, reading, and writing files using sequential and random access.
- C Data Structures: Introduction to self-referential structures and common data structures such as linked lists, stacks, and queues.
- C Preprocessor: The preprocessor directives in C, including
#include
,#define
symbolic constants and macros, conditional compilation#if...#endif
,#
and##
operators, predefined symbolic constants and assertion.
- Other C Topics: Redirecting input
<
and output>
, pipe|
, variable-length argument lists...
, command line argumentsargv
, compiling multiple source file programs usingextern
,static
and Makefile. Use ofexit
,atexit
, suffixes, signal handling, dynamic memory allocation usingcalloc
andrealloc
. Unconditional branching usingbreak
andgoto
statement.
- Designated initializers and compound literals
- Complex numbers
- Empty arguments in a macro
__VA_ARGS__
identifier and variable-length argument lists for macros__func__
predefined Identifier- Inline functions using keyword
inline
- Keyword
restrict
_Noreturn
function specifier- Static assertions using
_Static_assert
- Type-generic expressions using
_Generic
To compile C or C++ code, use the following command. For execution, run a.exe
on Windows and ./a.out
on Unix.
make compile FILE=<filename>
To clean up build binaries, use the following command:
make clean