What is a Pointer, Address Of(&) and Value Of(*) operator in C

What is pointer in C

* and & in c: pointer in C programming language is a variable which is used to store the address of another variable. We can access the value of a variable either by variable identifier or by directly accessing the memory location using pointers. A pointer is a derived data type that is created from fundamental data types. We use (*) for defining pointer variables.

<data_type> *<identifier>;

For Example:

  int A = 100;
  int *ptr = &A;

Here, ptr is a pointer to a variable of type int and is initialized with address of A.

What is Address Of(&) Operator and Value Of(*) Operator in C

Address of Operator (&)
The & is a unary operator in C which returns the memory address of the passed operand. This is also known as address of operator.

Value of Operator (*)
The * is a unary operator which returns the value of object pointer by a pointer variable. It is known as value of operator. It is also used for declaring pointer variable.
For Example

  int A = 100;
  int *ptr = &A;

In the first statement, we first declare an integer variable and initialize it with value 100. In next statement, we are declaring a pointer to a variable of type int and initializing it with address of A.

Answer Yourself:

What is the address of a pointer in c?
What are pointer operators in c?
What is indirection operator in c?
What is address operator in c?
What is the use of address operator in c?
What is * and & in pointer concept?
What is & and * operators in c?