Home / Questions / What is a pointer?
Explanatory Question

What is a pointer?

👁 966 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Pointers are variables which store the address of another variable. That variable may be a scalar (including another pointer), or an aggregate (array or structure). The pointed-to object may be part of a larger object, such as a field of a structure or an element in an array.

Syntax: data_type *var_name;
Where, * is used to denote that “p” is pointer variable and not a normal variable.

It is a variable that stores/points the address of another variable. Normal variable stores the value of the variable whereas pointer variable stores the address of the variable.