Variables and Memory
Learn how variables are stored in memory.
We'll cover the following...
Variables
To understand pointers, you must know how variables are stored in memory.
We have already seen that a variable is a named location in a computer’s memory where we can store our data.
See the program given below!
Press + to interact
#include <iostream>using namespace std;int main() {// Declares a variable John of type intint John;}
How are variables stored in memory?
Consider the analogy given in the previous lesson. The statement on Line No. 7 says reserve ...