what is the difference between i++ and ++ i ?
i = 1;
j = ++i;
(i is 2, j is 2)
//diference
i = 1;
j = i++;
(i is 2, j is 1)
what is the difference between i++ and ++ i ?
i = 1;
j = ++i;
(i is 2, j is 2)
//diference
i = 1;
j = i++;
(i is 2, j is 1)
difference between --a and a-- c++
// The difference is here:
int a = 0;
int b = a++; // b = 0, a = 1
// Where
int a = 0;
int b = ++a; // b = 1, a = 1
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us