Below you will find pages that utilize the taxonomy term “C”
“Modern C”: Notes on chapter 7 “Functions”
These are my notes taken while reading chapter 7 “Functions” from the book “Modern C” by Jens Gustedt.
This chapter discusses structuring C program using functions; particularly, attention is given to recursion, that is, to the ability of C functions to invoke themselves.
“Modern C”: Notes on chapter 6 “Derived data types”
These are my notes taken while reading chapter 6 “Derived data types” from the book “Modern C” by Jens Gustedt.
This chapter discusses objects that consist of other objects, such as arrays, pointers, structures, and type aliases.
How to avoid subtle bugs in malloc usage in C
Whenever a computer program needs to store data of the size determined only
during the runtime, then dynamic memory allocation is required.
Memory allocation happens in the memory heap, and in C is commonly done
via a library function malloc
, which has subtle things with its usage
that I would like to discuss here.
“Modern C”: Notes on chapter 5 “Basic values and data”
These are my notes taken while reading chapter 5 “Basic values and data” from the book “Modern C” by Jens Gustedt.
This chapter discusses values of different objects that are used in a C program, and how they are represented.
Array and pointers equivalence myth
I’d like to share some knowledge about subtle thing that I have learned recently in C. It is related to the relations between arrays and pointers, and how they are often treated as equivalent to each other (for example, this is how passing an array to a function works when one of the expected arguments is a pointer). However, arrays and pointers are not equivalent to each other.
“Modern C”: Notes on chapter 4 “Expressing computations”
These are my notes taken while reading chapter 4 “Expressing computations” from the book “Modern C” by Jens Gustedt.
This chapter discusses expressions, that is, computations based on some values, such as variables and literals.
“Modern C”: Notes on chapter 3 “Everything is about control”
These are my notes taken while reading chapter 3
“Everything is about control”
from the book “Modern C” by Jens Gustedt.
This chapter explains five control block statements:
conditional statements with if
, loops with for
, while
, and do-while
,
and selection statements with switch
.
“Modern C”: Notes on preamble “Level 1 Aquaintance”
These are my notes taken while reading the preamble for the part “Level 1. Aquaintance” from the book “Modern C” by Jens Gustedt. This preamble introduces stylistic decisions that the author uses in the rest of the book.
“Modern C”: Notes on chapter 2 “The principal structure of a program”
These are my notes taken while reading chapter 2 “The principal structure of a program” from the book “Modern C” by Jens Gustedt. This chapter explains details of C grammar, distinction between declaration and definition of objects, and statements.
“Modern C”: Notes on chapter 1 “Getting started”
These are my notes taken while reading chapter 1 “Getting Started” from the book “Modern C” by Jens Gustedt. This chapter introduces imperative programming and teaches how to compile and run a C program.
“Modern C”: Notes on the book by Jens Gustedt
These are the table of contents for my notes taken while reading the book “Modern C” by Jens Gustedt, which teaches C according to new language standards, C11 and C17.