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 clement is a liquid at STP? (1) bromine (3) francium (2) cesium (4) iodine
The price of play equipment for the school has just been reduced by 25%. The new , reduced price of the play equipment is 1500. What is the original price befor
Why did the gap between rich ans poor in Latin America grow after independence.
What did the Declaration of Independence do?
What are two Cabinet-level positions?
What is one promise you make when you become a United States citizen?
what is the cause to air pollution??? please help me!!!!
Given the balanced equation representing a reaction: O2 --> O + O What occurs during this reaction? (1) Energy is absorbed as bonds are brok
If both the President and the Vice President can no longer serve, who becomes President?
Which quantity can be calculated for a solid compound, given only the formula of the compound and the Periodic Table of the Elements? (1) the density of the com