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 of the following correctly defines politics?
Explain whether you think the british government acted wisely in dealing with the colonies
Mrs. Carter baked 100 muffins for a bake sale. The muffins were sold in packages in 2. There were 12 muffins left. Write an equation to find how many customers
George Washington how old would he be today
What is the definition of a map legend
What was the "Era of Good Feelings"? a time when Americans moved West a time when there was little political strife a time when Federalists held political power
The lovin lemon company sells a 4 gallon jug of lemonade for $24. the sweet and sour company sells an eight pack of 1quart bottles of lemonade for $16.00. which
What is the value of expression? 6^-7*6^4 A. 6^-3 B. 6^-11 C. 6^-28 D. 6^11
multiples of 2,3,4,6,9,10 and 5
what is the context clue in he grabbed his lunch from kitchen table in went to school