Pointers in c++
A variable which holds the address of a memory location is called a pointer. It deals with memory. To create a pointer variable, follow the syntax. ‘datatype *variable_name;’ Eg: ‘int *ptr;’ C++ Program: This program includes the built-in header file <iostream>. Next main() is defined. It has following steps: A variable a is declared as integer. It reads the user input from command prompt. A pointer variable *ptr is declared. #include <iostream> using namespace std; int main() { int a;//Declaration of integer variable int *ptr; // Declarartion of pointer variable // getting the input from user cout<<"Enter the variable:"<<endl; cin>>a; // storing address of a in pointer myptr ptr = &a; cout << "Value o...