Which languages have different reading gor postfix and prefix increments | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

Which languages have different reading gor postfix and prefix increments

Which are the coding languages that will have different values for say ++a;

18th Jun 2019, 2:18 AM
Akash Raj
Akash Raj - avatar
1 Réponse
+ 1
int x=0; int d=x++; //value of d is 0 //Now value of x is 1 int u=++x; //value of u is 2 d=x++ ; means initially store the value of x into d then increament u=++x; Means initially increament the value of x then store into u ☺
1st Jul 2019, 6:59 AM
Kelvin Paul
Kelvin Paul - avatar