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 ruler united the Persians into a powerful kingdom?
a baseball team has home games on Thursday and Saturday. the two teams together earn $4746.50 for the team. Thursdays game generates $53.50 less than Saturday's
There are several types of tissues found in plants. Two examples are ________ tissue and _______ tissue
What is 2.06% written as a decimal ?
Which of the following is a radical? O H OH H2O
Who was the president when the Bill of Rights was passed?
what is the answer to Jody has a rectangular piece of fabric 7/8 yard long and 4/5 wide. what's the area of the fabric? and Jody shares a piece with her friend
Which piece of legislation made it illegal for employers to discriminate against qualified applicants who have disabilities? the Civil Rights Act the Economic O
41% of the students at an art college want to be graphic designers. About what fraction of the students want to be graphic designers?
What is 825 divided by 7