C++ Program Execution Model

How does C++ program looks in memory ?

Compilation of Program

You write your program in C++ language and when you compile it, it first gets translated into assembly language and then into machine code (0’s and 1’s).

Execution – Memory model

Your executable resides on hard drive. When you execute the program, it first gets loaded into main memory. Then CPU executes instructions.