What is the importance of post increment and pre increment in C++?

152 views

What is the importance of post increment and pre increment in C++?

In: 7

7 Answers

Anonymous 0 Comments

There’s no importance, it’s just programming logic and short hand for

<operation>

c = c + 1;

//c++;

It’s all the same. If you want to pre-increment a variable it’s just doing the

c = c + 1;

<operation>

//++c;

Before the operation.

You are viewing 1 out of 7 answers, click here to view all answers.