sorozco2787 sorozco2787
  • 04-09-2020
  • Computers and Technology
contestada

Write a declaration for floating-point variable lastVal that’s to retain its value between calls to the function in which it’s defined.

Respuesta :

codiepienagoya codiepienagoya
  • 04-09-2020

Answer:

The following are the variable declaration to this question:

static float lastVal;

Explanation:

In the question, it is already defined that a method is defined and inside the method a "lastVal" a float variable is declared that uses the static keyword, which means throughout the program its value can't be changed, and throughout the program, it's one copy is generated, and Inside the method, its declaration does not use such a variable, it only works locally.

Answer Link

Otras preguntas

What is the best definition of the term imagery
The study of economics: a. looks at the economy from the viewpoint of one's own pocketbook, not from the standpoint of society's interest. b. is mainly an acade
30 rounding to the nearest ten
two supplementary angles differ by 48°. find the angles.
Which are precautions to take when working with heat and fire?
SOCIOLOGY NOT SOCIAL STUDIES
a contractor estimates that he can paint a house in 5 days using 6 men. if he actually uses 5 men for the job, how many days will they take to paint the house?
What is the appropriate personal pronoun for the bold words in this following sentence yes, Tina and Lily will enjoy it very much
What did columbus name the first island he visited in the americas?
Social responsibility (what are our responsibilities to other human beings economically and medically)? My assignment is a 6 paragraph essay and I DO NOT want s