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

Why did the kushite King become ally of the Hyksos
A can of soup has a volume of 12 fluid ounces. About how many milliters is this?
A model is 4.2 feet tall, the plywood used to make the model is 0.6 inch thick. How many sheets of plywood to make the model?
what is the P.O.V of HOOT
Why did the committee of public safety consider monopoly to be such a serious crime?
what structure is common in all 6 kingdoms of living organisms?
What is 500% as a fraction?
Which word in this sentence is a participle? The salesperson carefully folded the crumpled garments. a. crumpled b. carefully c. folded d. garments
what is the role of hormone in male and female reproductive system?
Salt has cubed, block-like crystals. It is part of the _____. A orthorhombic crystal system B hexagonal crystal system C isometric crystal system D triclinic cr