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

Why did the Greek historian Herodotus show bias against the Persians
Jews were severely persecuted following the fall of this nation to the German army.
How does the position of a digit in a number relate to its value
Sasha has 4 quarters in her pocket. She has 6 times as many quarters in her piggy bank. How many quarters does she have in her piggy bank ?
Why do some people doubt that Shakespeare is the actual author of the plays attributed to him? a. Shakespeare was too busy being an actor to have written them.
Find the x and y-intercepts of the line whose equation is 3x+ 5y=-15
What is 6 divided by 6n equals 14
if Robert buys a candy bar for 78 cents, how much change does he get back from a one-dollar bill?*
ball is dropped from rest at a height of 80m above ground. what is its speed just as it hits the ground.
The Virginia Company wanted to find a route to the Pacific Ocean in order to trade with