Pointers:
Pointers are Special Type of variables which are used to store the Address of Another variable or memory location. Using a pointer variable we can access and modify the value of a variable of which it consists the address. A pointer variable can hold the address of one memory location at a time.
the data type of pointer variable and the variable of which it consist the address should be same.
Syntax:
dataType *ptrVariable;
note: we can't perform Arithmetic operations on Addresses except Subtraction.
For example:
int a,b;
=&a+&b;(Invalid)
Pointers are Special Type of variables which are used to store the Address of Another variable or memory location. Using a pointer variable we can access and modify the value of a variable of which it consists the address. A pointer variable can hold the address of one memory location at a time.
the data type of pointer variable and the variable of which it consist the address should be same.
Syntax:
dataType *ptrVariable;
note: we can't perform Arithmetic operations on Addresses except Subtraction.
For example:
int a,b;
=&a+&b;(Invalid)