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

which phrase describes an unknown or changeable quantity?
need help with these
Verify the property a x (b+c) =(a x b)+(a x c) by taking: a = -7, b = (2/5), c = (-3/7)
information about coniferous forest
3x = 6+y - 3х + y = -6
What is the probability that the first spiner will land on an odd number and the second spiner will land on vowel number ?
Below are works-cited entries for an article from Time magazine by Jonas Knight. Select the one that is completely correct Entry A: Knight, Jonas. Controversial
Triangle ABC was rotated about the origin. Which ruledescribes the rotation?A) Ro,90°B) Ro,180°C) Ro,270°D) Ro,360°​
Please answer this in 2 minutes
Cases that the Supreme Court agrees to hear are placed on the Court’s docket. A docket is a __________. A. summary of court decisions B. legal explanation of th