Little question
#1

what is the diffrence between:
++i
to
i++
Reply
#2

++i will increment the value of i, and then return the incremented value.
i++ will return the pre-incremented value and then increment the value of i.

http://stackoverflow.com/questions/2...etween-i-and-i
Reply
#3

Quote:
Originally Posted by emokidx111
Посмотреть сообщение
++i will increment the value of i, and then return the incremented value.
i++ will return the pre-incremented value and then increment the value of i.

http://stackoverflow.com/questions/2...etween-i-and-i
Thanks
Reply
#4

If u will study C language,you will study Pre-Increment and Post-Incremet.

Pre-Increment = First use then change

and

Post-Increment = First use then change.

In ur question ++i = pre-increment and i++ = post-increment
Reply
#5

If u will study Java language,you will study Pre-Fix and Post-Fix.

Pre-Fix = change and then use.

and

Post-Fix = use and then change.

In ur question ++i = pre-fix and i++ = post-fix
Reply
#6

Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
If u will study C language,you will study Pre-Increment and Post-Incremet.

Pre-Increment = First use then change

and

Post-Increment = First use then change.

In ur question ++i = pre-increment and i++ = post-increment
Quote:
Originally Posted by [bot]fatninja
Посмотреть сообщение
If u will study Java language,you will study Pre-Fix and Post-Fix.

Pre-Fix = change and then use.

and

Post-Fix = use and then change.

In ur question ++i = pre-fix and i++ = post-fix
I just found the difference of:
Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
C language
Quote:
Originally Posted by [bot]fatninja
Посмотреть сообщение
Java language
Did you like, copy paste it !? Anyways, the question was already answered.
Also, by the way, @ Gamer_007, it's C++ ! C is a different language.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)