Skip to content

C How to Program (with an introduction to C++) 8th Edition, Paul & Harvey Deitel.

Notifications You must be signed in to change notification settings

saudzahirr/CHowtoProgram

Repository files navigation

C How to Program

C How to Program, with an introduction to C++.

Contents

  • 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, and do...while loops, as well as if, if...else and switch 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 and scanf.
  • 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 arguments argv, compiling multiple source file programs using extern, static and Makefile. Use of exit, atexit, suffixes, signal handling, dynamic memory allocation using calloc and realloc. Unconditional branching using break and goto 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

Program Compilation

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>

Clean

To clean up build binaries, use the following command:

make clean

About

C How to Program (with an introduction to C++) 8th Edition, Paul & Harvey Deitel.

Resources

Stars

Watchers

Forks