Expert C++
上QQ阅读APP看书,第一时间看更新

Low-Level Programming with C++

Initially, C++ was perceived as the successor of the C language; however, since then it has evolved into something big, sometimes scary, and even untamable. With recent language updates, it now represents a complex beast that requires time and patience to tame. We will start this chapter with the basic constructs that almost every language supports, such as data types, conditional and loop statements, pointers, structs, and functions. We will look at those constructs from the perspective of a low-level systems programmer, curious how even a simple instruction can be executed by the computer. A deep understanding of these basic constructs is mandatory in building a solid base for more advanced and abstract topics such as object-oriented programming.

In this chapter, we will learn more about the following:

  • The details of program execution and its entry point
  • Special properties of the main() function
  • Intricacies behind the function call and recursion
  • Memory segments and addressing fundamentals
  • Data types and how variables reside in memory
  • Pointers and arrays
  • The low-level details of conditionals and loops