What is the “—>” operator in C/C++?

Explanation

There is no such --> operator in c/c++. So these are the two different – different separate operators. Such as  -- and >

Here we will take a scenario. We want to decrement the X. So first it will return the original value of x which is not decremented. So it will compare that value with 0. By using the  >  operator. And --  this operator is generally used to decrement the value of any number. 

So to understand the concept better look at the following line of code. We can use this operator as follows:

while( (x--) > 0 )

There are many different operators in c/c++.

 

Also read, What is the difference between ‘git pull’ and ‘git fetch’?

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *