¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
Increment operators
What is the difference between the prefix and postfix increment operators it's really confusing when used in a code. What would be delighted output of this code. int a= 5; int b= 4; b= a++; cout << b;
2 Respuestas
0
Prefix: makes increment, return you original object
Postfix: makes copy with old value, increments value, returns you old copy.
In statements returned values are used.