In this article, we will be focusing on Arrow operator in C. C language
comprises of various operators to deal and manipulate the data records. One such operator is the Arrow operator.
So, let us begin!
In C, this operator enables the programmer to access the data elements of a Structure or a Union.
This operator(->)
is built using a minus(-) operator and a greater than(>) relational operator. Moreover, it helps us access the members of the struct or union that a pointer variable refers to.
Let us now focus on the structure of Arrow operator in C.
Have a look at the below syntax!
(pointer variable)->(variable) = value;
The operator is used along with a pointer variable. That is, it stores the value at the location(variable) to which the pointer/object points.
Let us now implement this operator through some examples in the upcoming section.
#c programming #c #c-language #arrow operator