Arrow Operator In C

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!

Working of Arrow operator in C?

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.

Syntax of Arrow operator(->)

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

Arrow operator in C - All you need to know!
11.55 GEEK