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

What statement best describes a republic?
what are 2 examples of ionic compound?
Which statement accurately describes the significance of the Magna Carta? A. It gave absolute power to the English king over the church and nobility. B.
what is the geometric mean between 6 and 20?
What does hemostasis mean?
The rectangle has an area of 4(x+3) square units. A- If the dimensions of the rectangle are doubled, what is the area of the new rectangle in terms of x? Show y
How do I do trebuchet calculations????? Help me please
Angie takes a random sample of 100 students in her school and finds that 58% of the sample prefers art over music. There are 1,200 students in the school. Based
What is the adjective in the following sentence? The yellow sun hung brightly in the sky. a. Brightly b. Sun c. Yellow d. Hung
how many 1 1/2 centimeter cubes can fit into a rectangular prism that has a length of 12 centimeters , a width of 6 centimeters and a height of 9 centimeters