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

Which of the following is NOT a common way businesses pay employees?
What is the surface area of a sphere with a 4 ft diameter (round to 1 decimal)? A) 12.6 ft2 B) 16.7ft2 C) 50.2 ft2D) 100 ft2​
Math homework pls help!!
WILL GIVE BRAINLIEST The British established the East India Company to acquire A. oil and other natural resources in Asia. B. spices and other goods found in
Writing how to describe someone slowly start laughing
Help help help! Lateral area means total surface area I believe! Thanks!
What would happen if the moon revolution speed was half as fast as it is now
A cat weighs​8 1/4​pounds. How many ounces does the cat weigh?
Find the perimeter of a triangle with sides lengths 8, 10, and 12. 36 14 15 30
Which of the following could describe a rhyming poem about monkeys that fly airplanes? A) a patterned poem B) a haiku C) nonfictional D) a biography