CopyPastor

Detecting plagiarism made easy.

Score: 0.9609548606068254; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-02-19
by Usman

Original Post

Original - Posted on 2010-02-23
by David Johnstone



            
Present in both answers; Present only in the new answer; Present only in the old answer;

They both increment the number. `++i` is equivalent to `i = i + 1`.
`i++` and `++i` are very similar but not exactly the same. Both increment the number, but `++i` increments the number before the current expression is evaluated, whereas `i++` increments the number after the expression is evaluated.
Example:
int i = 1; int x = i++; //x is 1, i is 2 int y = ++i; //y is 3, i is 3
They both increment the number. `++i` is equivalent to `i = i + 1`.
`i++` and `++i` are very similar but not exactly the same. Both increment the number, but `++i` increments the number before the current expression is evaluted, whereas `i++` increments the number after the expression is evaluated.
int i = 3; int a = i++; // a = 3, i = 4 int b = ++a; // b = 4, a = 4


        
Present in both answers; Present only in the new answer; Present only in the old answer;