“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.
Universal initialization in C++
For my new position, I need to improve my knowledge of the C++ programming language (which I did not use basically since 2010). So I have started reading the book Discovering Modern C++ by Peter Gottschling to get up to speed with, well, modern C++.
JavaScript: functions
As any programming language, JavaScript allows to pack useful things into functions, and it is the key to good JavaScript knowledge, to use them efficiently. In this post, I describe three ways that the functions can be declared in JavaScript, talk about visibility of variables inside the functions, how to have optional function arguments with default values, how to create closures (functions, bound to outer variables), and how to use recursion.
Solving Perfect Squares problem using breadth-first search
I was learning recently about solving problems that use breadth-first search (BFS). This is a family of computer science algorithms that traverse tree data structures “by levels”. That is, starting at the root, we process all nodes on level 1, then all nodes on level 2, etc.
One typical application of BFS is to find the shortest path between the root and the given nodes.
To implement BFS, one should use the queue data structure.
Redirection of stdout and stderr to the same file
Often, when running a program in console, one needs to save all its output
to a file.
Very often, such a program writes both to the standard output (stdout)
and to the standard error output (stderr).
For example, by default, in a Python program the print function writes to
stdout and the functions of the logging module to stderr.
Therefore, one needs to redirect both stdout and stderr to the same file.