FreshLuck6277 FreshLuck6277
  • 08-02-2018
  • Computers and Technology
contestada

Write the definition of a function named newbie that receives no parameters and returns 1 the first time it is invoked (when it is a "newbie"), and that returns 0 every time that it is invoked after that.

Respuesta :

roger48118
roger48118 roger48118
  • 08-02-2018
int  newbie(void){
static  int  a;
if(!a) {a=1;return  1;}
return 0;
}

Answer Link

Otras preguntas

Who is William Penn's kryptonite?( what challenged him)
Is angle 19 a interior angle? I was kind of confused on this, because it's still not completely on the inside.
If a hose is filling a swimming pool at a rate of 20 liters per minute, how long will it take to fill the 3,600-gallon pool?
What is the approximate frequency of a photon having an energy 5 x 10^-24 J? key: H = 6.6 x 10 ^-34 J·S how do I solve this ?
Write a word problem where the answer is 27 ¼.
1/2 (3/2 y + 1/3) = -1/2 (y- 5/2)
A whale ,a dolphin ,and a crab all belong in the same category because
What is the prime factorization for 120?
What economic activity did the climate of the Southern Colonies best support? A. Fishing B. Coal mining C. Livestock herding D. Plantation farming
What are basic needs of living things?
good job