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

how do I solve for x? -3x+7=1
What is the position of C on the number line below write your answer as a fraction or mixed number
124Don José dejó de la pared para pintar con colores cálidos. Si pintará de color café - de166lo destinado a los colores cálidos, ¿qué parte de la pared será de
I need help with my math, please help
which system is made up of two difference components​
Please help me solve all of these
A sandwich shop has 40 stores and 80% of the stores are in California. The rest of the stores are in Nevada how many stores are in California and how many are i
Create a static method that: - is called appendPosSum - returns an ArrayList - takes one parameter: an ArrayList of Integers This method should: - Create a new
Find the area of each sector. Omg please help due in 5 min!!
How does Hydro Technology and Hydro Energy Help with Global Water Issues? Could someone please help me asap