0

Please help me in learning prefix and postfix with an example

20th Jul 2016, 5:29 PM
Roman
Roman - avatar
2 Respuestas
0
If you have A= 2 B=3 And say Y= a+b++; That means you will add a to b and then increment the b. it will look like this Y= 2+3; Changes B to 4 If you have Y= a+(++b) you're telling the compiler to add A to B After you increment the B So it will look like Y=2+4 B=4 Same thing goes for decrementing.
20th Jul 2016, 5:59 PM
Farrah
0
the difference is it adds 1 and then assigns it to the variable, the other does this in reverse
21st Jul 2016, 5:00 AM
doug vandekieft
doug vandekieft - avatar