ehuntsman541 ehuntsman541
  • 02-03-2018
  • Computers and Technology
contestada

Write a function addone that adds 1 to its integer reference parameter. the function returns nothing. submit

Respuesta :

tonb
tonb tonb
  • 02-03-2018
void addone(int &n) { n++; }

This would do the trick in C++, assuming that's what you're looking for.
Answer Link

Otras preguntas

Which feature is shared by protists, fungi, plants, and animals but is lacking in bacteria? a. DNA b. a nucleus c. reproduction d. cell membrane
Discovery of streets arranged in a grid-like pattern and a system of pipes for moving water in Harappa and Mohenjo-Daro suggest that these ancient river valley
In what year did the American Revolution begin? A. 1774 B. 1775 C. 1776 D. 1777
Toussaint L’Ouverture and José de San Martín are leaders best known for (1) leading independence movements (2) supporting religious reforms (3) promoting civil
Why were the Anti-federalists against ratifying the Constitution?
A bottle contains 12 red marbles and 8 blue marbles. A marble is chosen at random and not replaced. Then, a second marble is chosen at random. Determine the pro
Which event sparked the outbreak of World War I? (1) attack on Pearl Harbor by Japan (2) Germany’s invasion of Poland (3) Bolshevik coup d’état in Russia (4) as
Is it really incorrect to start a sentence with “and”?
Convert 1.7 Kg to cg
By the Fall of 1940, Germany controlled how much of western Europe? a. Very little c. About half b. Almost all d. None