
112 C++ Declarations
Explanation: In the above program, variables, a, b, c, and d are declared. In next statement,
all four variables are initialized with a value 5. First the value 5 assigned to variable d, then the
value of d is assigned to c, c is assigned to b, and finally b is assigned to a.
Here the variables are local and they are stored in
the stack. Stack is the portion of the random access
memory (RAM). Generally it is located at end of
RAM to avoid overlapping of program and data
memory. Figure 4.5 simulates this assignment.
4.3.4 Dynamic Initialization
The declaration and initialization of variable in a single statement at any plac ...