Aug 27, 2024
int num = 5;, the value of the num variable is 5.num is just a symbol that refers to that address.num variable is stored at the 120 address.int* p; to create a pointer.p = # stores the address of num in the pointer.**p to access the value of the variable through the pointer.cout << *p; displays the value at that address.& is used to get the address of a variable.&num gets the address of num.*p += 1; to increment the pointed value.These notes provide detailed information about pointers, which will assist students when programming in C++.