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

The map below shows Germany divided into four quadrants: (The map is provided below in comments) Which sections shown in the map above merged together in 1948
What is the surface area of the box if it is scaled up by the factor of 10 and the surface area is 16in
What universal themes are conveyed by the description of battles between beowulf and grendel and between beowulf and grendels mother?
To the nearest inch, what is the length of the springboard?
In 2006 what was the leading cause of death among people aged 65 or older
is college worth attending?
how do you convert 250% into a fraction
vascular plants consist of about _____ of all living plants species?
??????? Help please please
Jules likes to watch comedies, dale prefers to watch dramas. which revision most effectively corrects the comma splice?