1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Westkost [7]
3 years ago
12

Write the definition of a function named alternator that receives no parameters and returns true the first time it is invoked, r

eturns false the next time it is invoked, then true , false and so on, alternating between true /false on successive invocations.
Computers and Technology
1 answer:
victus00 [196]3 years ago
5 0
Visual C++ Programming is the software where the function defined in the question can be used. The return type of the Boolean method is applied. This is the code for the function.

bool newbie()
{
      static bool x = true;
      if (x) {
           return true;
      } else {
           return false;
      }
}
You might be interested in
Why might a company choose Linux for its operating system instead of Microsoft Windows or Mac OS? The company's employees can sy
insens350 [35]

Answer:

D.

The company can create an operating system to fit its specific needs.

Explanation:

Linux is an open source operating system format, which can be modified to fit specific needs of it's users.

6 0
3 years ago
Janet received an email from a bank asking for the password for her Internet banking account. She emailed back her password. A f
Tcecarenko [31]
Probably a phishing scam

asks for personal information claiming to be a person from a legitimate bank
6 0
3 years ago
Read 2 more answers
A group of two or more computer systems linked together via communication devices is called:.
ioda

A group of two or more computer systems linked together via communication devices is called: A Network

5 0
3 years ago
HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
EastWind [94]

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

5 0
3 years ago
Which of the following is considered to be intellectual property?
ad-work [718]

The answer is actually A. I took the test and selected the wrong answer, but A was the one the test said was right. Plz mark brainliest!!! Hope this helped! ;^)

4 0
3 years ago
Other questions:
  • Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching
    12·1 answer
  • What are the two major components of a processor cooler assembly?
    15·1 answer
  • What happens when a flash memory card is installed in a slot and it is recognized by windows?
    6·1 answer
  • A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of the clie
    8·1 answer
  • Name a piece of software you often use where it is easy to produce an error. Explain ways you could improve the interface to bet
    5·1 answer
  • . A possible data for source that could be used when completing a mail merge could be a(n)… : *
    13·2 answers
  • Courses that enable students to begin jobs that require course completion certificates are know as
    8·1 answer
  • Assume that class BankAccount exists, and that it has a constructor that sets the private field balance, and that setBalance and
    13·1 answer
  • Which item is developed last in the cyclical design process
    11·1 answer
  • A ____ is someone who develops programs and apps or writes the instructions that direct the computer or mobile device to process
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!