emilysawyer6674 emilysawyer6674
  • 04-07-2019
  • Computers and Technology
contestada

Explain the difference between the prefix and postfix forms of the increment operator.

Respuesta :

SerenaBochenek SerenaBochenek
  • 14-07-2019

Answer:

The prefix form of increment operator is ++a, for the variable a.

  • it first increments the value of the variable and substitutes the incremented value of the variable to the expression.

The postfix form of increment operator is a++, for the variable a.

  • it substitutes the existing value of the variable to the expression and then increments the value.

Explanation:

Let a = 6.

++a + 5 = 12.

but

a++ + 5 =11.

Answer Link

Otras preguntas

If you are unsure about whether or not to include a citation because you have seen that information somewhere else before
Graph the function f(x)=1/2 sqrt(x+1) to do so, graph the lefmost point and three additional points. What are the 4 graph points?
if you need to apply a c-spine then do you switch you assesment over to a trama assesment
How did the institution of slavery continue to affect the world even after it was abolished?
Find the domain of the graphed function.
4.12 to the nearest tenth
A galvanometer with a resistance of 40.0 ω deflects full scale at a current of 2.0 ma. what resistance should be used with this galvanometer in order to constru
Color film always has at least how many layers of light sensitive material?
A soma dos doze primeiros termos de uma Pg de razão 3 é 265.720. Determine o primeiro termo.
Consider the equation: 3 4 x − 12 = 12.