Pointers in C++
Pointers: As you know every variable is a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator which denotes an address in memory. Consider the following which will print the address of the variables defined − #include using namespace std; int main () { int var1; char var2[10]; cout << "Address of var1 variable: "; cout << &var1 <<…
View On WordPress

















