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 were some of the difficulties America faced in maintaining good relations with Japan?
Joe and Hannah leave home at the same time traveling opposite . directions Joe drive 45 mph and Hannah drive 40 mph and how many hours was 510 miles apart
Which characteristic does ancient India share with other early civilizations such as the Egyptians Mesopotamia and the Chinese?
A miniature horse weighs 228 fewer kilograms than a shetland pony. Miniature horse weighs 53kg
Which process involves the removal of rock particles by wind water ice or gravity?
Which environment disaster took place near Niagara Falls?
_____ established plantations on islands off the coast of Africa.
Theodore Roosevelt supported powerful corporations that
A significant effect of the First Great Awakening was that it
Which person is best associated with education reform in the U.S.? Richard Allen Dorothea Dix Horace Mann Joseph Smith