i++ vs ++i in C and C++

Prefer ++i over i++.


In C language, there is no difference between ++i and i++.
In C++, ++i has performance gain rather than i++ because of object copy.

In detail, refer followings

댓글

이 블로그의 인기 게시물

[Math] GCD & LCM

Useful Linux Command Line Bash Shortcuts You Should Know

Write Me...: blogger 에 마크다운(Markdown) 적용하기