Object-Oriented Data Structures in C++


Every C++ variable has four things:

int primeNumber = 7;

Let's see an example of a Data Structures in Cpp/C++ Basics/Variables within a script

cpp-memory/addressOf.cpp

#include <iostream>

int main(){
	int num = 7;

	std::cout << "Value: " << num << std::endl;
	std::cout << "Adress: " << &num << std::endl;

	return 0;
}

Here, we are able to access the address can be access making use of a calling by reference &num

You can also see the size of a variable with the sizeof() command.


Stack Memory