modern_c_for_absolute_beginners_-_a_friendly_introduction_to_the_c_programming_language_by_slobodan_dmitrovic

Modern C for Absolute Beginners - A Friendly Introduction to the C Programming Language by Slobodan Dmitrović

Return to C Language bibliography

Modern C for Absolute Beginners - A Friendly Introduction to the C Programming Language by Slobodan Dmitrović

By Slobodan Dmitrović

9781484266434 - 978-1484266434 - B08VN52V3W

Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language

TIME TO COMPLETE: 4h 14m

TOPICS: C

PUBLISHED BY: Apress

PUBLICATION DATE: February 2021

Learn the C programming language easily and in a straightforward way. This book teaches the basics of C, the C Standard Library, and modern C standards. No previous programming experience is required.

C is a language that is as popular today as it was decades ago. C covers a wide variety of domains. It can be used to program a microcontroller, or to develop an entire operating system. This book is an effort to introduce the reader to the C programming language in a concise and easy to follow manner.

The author takes you through the C programming language, the Standard Library, and the C standards basics. Each chapter is the right balance of theory and code examples.

After reading and using this book, you'll have the essentials to start programming in modern C.

What You Will Learn

  • The C programming language fundamentals
  • The C Standard Library fundamentals
  • New C Standards features
  • The basics of types, operators, statements, arrays, functions, and structs
  • The basics of pointers, memory allocation, and memory manipulation
  • Take advantage of best practices in C

Who This Book Is For

Beginner or novice programmers who wish to learn the C programming language. No prior programming experience is required.

Resources

Table of Contents

Part I: The C Programming Language

Chapter 1:​ Introduction

  • 1.​1 What Is C?​
  • 1.​2 What Is C Used For?​
  • 1.​3 C Compilers
  • 1.​3.​1 Installing Compilers
  • 1.​4 C Standards

Chapter 2:​ Our First Program

  • 2.​1 Function main()
  • 2.​2 Comments
  • 2.​3 Hello World

Chapter 3:​ Types and Declarations

  • 3.​1 Declarations
  • 3.​2 Introduction
  • 3.​3 Character Type
  • 3.​4 Integer Type
  • 3.​5 Floating-Point Types
  • 3.​5.​1 float
  • 3.​5.​2 double
  • 3.​5.​3 long double

Chapter 4:​ Exercises

  • 4.​1 Hello World with Comments
  • 4.​1.​1 Declaration
  • 4.​1.​2 Definition
  • 4.​1.​3 Outputting Values

Chapter 5:​ Operators

  • 5.​1 Introduction
  • 5.​2 Arithmetic Operators
  • 5.​3 Assignment Operator
  • 5.​4 Compound Assignment Operators
  • 5.​5 Relational Operators
  • 5.​6 Equality Operators
  • 5.​7 Logical Operators
  • 5.​8 Increment and Decrement Operators
  • 5.​9 Operator Precedence

Chapter 6:​ Expressions

  • 6.​1 Initialization
  • 6.​2 Type Conversion

Chapter 7:​ Statements

  • 7.​1 Introduction
  • 7.​2 Selection Statements
  • 7.​2.​1 if
  • 7.​2.​2 if-else

7.​2.​3 switch 7.​3 Iteration Statements 7.​3.​1 while 7.​3.​2 do-while 7.​3.​3 for

Chapter 8:​ Exercises

  • 8.​1 Arithmetic Operations
  • 8.​2 Integral Division
  • 8.​3 Floating-Point Division and Casting
  • 8.​4 Equality Operator
  • 8.​5 Relational and Logical Operators
  • 8.​6 The switch Statement
  • 8.​7 Iteration Statements

Chapter 9:​ Arrays

  • 9.​1 Declaration
  • 9.​2 Subscript Operator
  • 9.​3 Array Initialization
  • 9.​4 Character Arrays
  • 9.​5 Multidimensional​ Arrays
  • 9.​6 Array Size and Count

Chapter 10:​ Pointers

  • 10.​1 Introduction
  • 10.​2 Declaration and Initialization
  • 10.​3 Pointers and Arrays
  • 10.​4 Pointer Arithmetics
  • 10.​5 Void Pointers
  • 10.​6 Pointer to Character Arrays
  • 10.​7 Arrays of Pointers

Chapter 11:​ Command-Line Arguments

Chapter 12:​ Exercises

  • 12.​1 Character Array
  • 12.​2 Array Elements
  • 12.​3 Pointer to an Existing Object
  • 12.​4 Pointers and Arrays
  • 12.​5 Pointer to a Character Array
  • 12.​6 Pointer Arithmetics
  • 12.​7 Array of Pointers

Chapter 13:​ Functions

  • 13.​1 Introduction
  • 13.​2 Function Declaration
  • 13.​3 Function Definition
  • 13.​4 Parameters and Arguments
  • 13.​4.​1 Passing Arguments
  • 13.​5 Return Statement

Chapter 14:​ Exercises

  • 14.​1 A Simple Function
  • 14.​2 Function Declaration and Definition
  • 14.​3 Passing Arguments by Value
  • 14.​4 Passing Arguments by Pointer/​Address
  • 14.​5 Function – Multiple Parameters

Chapter 15:​ Structures

  • 15.​1 Introduction
  • 15.​2 Initialization
  • 15.​3 Member Access Operator
  • 15.​4 Copying Structures
  • 15.​5 Pointers to Structures
  • 15.​6 Self-Referencing Structures
  • 15.​7 Structures as Function Arguments

Chapter 16:​ Unions

Chapter 17:​ Conditional Expression

Chapter 18:​ Typedef

Chapter 19:​ Const Qualifier

Chapter 20:​ Enumerations

Chapter 21:​ Function Pointers

Chapter 22:​ Exercises

  • 22.​1 Structure Definition
  • 22.​2 Structure Typedef Alias
  • 22.​3 Structure Initialization
  • 22.​4 Pointers to Structures
  • 22.​5 Unions
  • 22.​6 Const Variables and Pointers
  • 22.​7 Constant Function Parameters
  • 22.​8 Enums
  • 22.​9 Pointers to Functions

Chapter 23:​ Preprocessor

  • 23.​1 #include
  • 23.​2 #define
  • 23.​3 #undef
  • 23.​4 Conditional Compilation
  • 23.​4.​1 #if
  • 23.​4.​2 #ifdef
  • 23.​4.​3 #ifndef
  • 23.​5 Built-in Macros
  • 23.​6 Function-Like Macros

Chapter 24:​ Exercises

  • 24.​1 Define and Undefine a Macro
  • 24.​2 Conditional Compilation
  • 24.​3 Built-in Macros
  • 24.​4 Function Macros

Chapter 25:​ Dynamic Memory Allocation

  • 25.​1 malloc
  • 25.​2 calloc
  • 25.​3 realloc

Chapter 26:​ Storage and Scope

  • 26.​1 Scope
  • 26.​1.​1 Local Scope
  • 26.​1.​2 Global Scope
  • 26.​2 Storage
  • 26.​2.​1 Automatic Storage Duration
  • 26.​2.​2 Static Storage Duration
  • 26.​2.​3 Allocated Storage Duration

Chapter 27:​ Exercises

  • 27.​1 Dynamic Memory Allocation
  • 27.​2 Dynamic Memory Allocation:​ Arrays
  • 27.​3 Dynamic Memory Resizing
  • 27.​4 Automatic and Allocated Storage

Chapter 28:​ Standard Input and Output

  • 28.​1 Standard Input
  • 28.​1.​1 scanf
  • 28.​1.​2 sscanf
  • 28.​1.​3 fgets
  • 28.​2 Standard Output
  • 28.​2.​1 printf
  • 28.​2.​2 puts
  • 28.​2.​3 fputs
  • 28.​2.​4 putchar

Chapter 29:​ File Input and Output

  • 29.​1 File Input
  • 29.​2 File Output

Chapter 30:​ Exercises

  • 30.​1 Standard Input
  • 30.​2 Standard Output

Chapter 31:​ Header and Source Files

Part II: The C Standard Library

Chapter 32:​ Introduction to C Standard Library

  • 32.​1 String Manipulation
  • 32.​1.​1 strlen
  • 32.​1.​2 strcmp
  • 32.​1.​3 strcat
  • 32.​1.​4 strcpy
  • 32.​1.​5 strstr
  • 32.​2 Memory Manipulation Functions
  • 32.​2.​1 memset
  • 32.​2.​2 memcpy
  • 32.​2.​3 memcmp
  • 32.​2.​4 memchr
  • 32.​3 Mathematical Functions
  • 32.​3.​1 abs
  • 32.​3.​2 fabs
  • 32.​3.​3 pow
  • 32.​3.​4 round
  • 32.​3.​5 sqrt
  • 32.​4 String Conversion Functions
  • 32.​4.​1 strtol
  • 32.​4.​2 snprintf

Part III: Modern C Standards

  • Chapter 33:​ Introduction to C11 Standard
  • 33.​1 _​Static_​assert
  • 33.​2 The _​Noreturn Function Specifier
  • 33.​3 Type Generic Macros Using _​Generic
  • 33.​4 The _​Alignof Operator
  • 33.​5 The _​Alignas Specifier
  • 33.​6 Anonymous Structures and Unions
  • 33.​7 Aligned Memory Allocation:​ aligned_​alloc
  • 33.​8 Unicode Support for UTF-16 and UTF-32
  • 33.​9 Bounds Checking and Threads Overview
  • 33.​9.​1 Bounds-Checking Functions
  • 33.​9.​2 Threads Support

Chapter 34:​ The C17 Standard

Chapter 35:​ The Upcoming C2X Standard

  • 35.​1 _​Static_​assert Without a Message
  • 35.​2 Attributes
  • 35.​3 No Parameters Function Declaration
  • 35.​4 The strdup Function
  • 35.​5 The memccpy Function

Part IV: Dos and Don’ts

  • Chapter 36:​ Do Not Use the gets Function
  • Chapter 37:​ Initialize Variables Before Using Them
  • Chapter 38:​ Do Not Read Out of Bounds
  • Chapter 39:​ Do Not Free the Allocated Memory Twice
  • Chapter 40:​ Do Not Cast the Result of malloc
  • Chapter 41:​ Do Not Overflow a Signed Integer
  • Chapter 42:​ Cast a Pointer to void* When Printing Through printf
  • Chapter 43:​ Do Not Divide by Zero
  • Chapter 44:​ Where to Use Pointers?​
  • 44.​1 Pointers to Existing Objects
  • 44.​2 Pointers to Arrays
  • 44.​3 Pointers to String Constants
  • 44.​4 Pointers to Dynamically Allocated Memory
  • 44.​5 Pointers as Function Arguments

Chapter 45:​ Prefer Functions to Function-Like Macros

Chapter 46:​ static Global Names

Chapter 47:​ What to Put in Header Files?​

  • 47.​1 Shared Macros
  • 47.​2 Function Declarations
  • 47.​3 Shared extern Variables and Constants
  • 47.​4 Other Header Files

Part V: Appendices

Appendix A:​ Linkage

Appendix B:​ Time and Date

Appendix C:​ Bitwise Operators

  • C.​1 The Bitwise NOT Operator ~
  • C.​2 Bitwise Shift Operators « and »
  • C.​3 The Bitwise AND Operator &​

Appendix D:​ Numeric Limits

  • D.​1 Integer Types Limits
  • D.​2 Floating-Point Types Limits

Appendix E:​ Summary and Advice

  • E.​1 What to Learn Next?​
  • E.​2 Online References
  • E.​3 Other C Books
  • E.​4 Advice
  • Index
modern_c_for_absolute_beginners_-_a_friendly_introduction_to_the_c_programming_language_by_slobodan_dmitrovic.txt · Last modified: 2024/04/28 03:34 (external edit)