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
Pachacha [2.7K]
4 years ago
9

Write the definition of a function named counter that receives no parameters and returns 0 the first time it is invoked, returns

1 the next time it is invoked, then 2, 3 and so on.
Computers and Technology
1 answer:
Diano4ka-milaya [45]4 years ago
8 0

Answer:

int counter( )

{

static int xvalue = 0;

return(xvalue++);

}

Explanation:

The first line of code declares the function and its return type integer. Then we create a static variable xvalue and initialize to 0. the statement return(xvalue++) ensures that at each method call, the value of integer is increased by 1

You might be interested in
Which of the following activities is primarily an employer’s responsibility to help prevent workplace violence?
Lera25 [3.4K]
I believe that's b, i'm not 100% sure though
5 0
3 years ago
Read 2 more answers
Why is it unlikely that you will find the ip address 192.168.250.10 on the internet?
gayaneshka [121]
That IP address is either Internal, private or reserved
5 0
4 years ago
When you combine and and or operators, the ____ operators take precedence, meaning their boolean values are evaluated first.
hodyreva [135]

When you combine and and or operators, the <u>OR</u><u> ope</u>rators take precedence, meaning their boolean values are evaluated first.

<h3>When you use the _ operator only one of the listed conditions?</h3>

Relational comparison operators. Nested if. Using this operator, each Boolean phrase must be true for the entire expression to be evaluated as true. When this operator is used, only one of the listed requirements must be met for the resulting action to take place.

<h3>Which operator has the highest precedence?</h3>

Arithmetic operators have higher importance than relational operators, and relational operators have a higher precedence than assignment operators. Despite this, it is a good idea to place parentheses around an arithmetic expression when its result will be used in a relational expression.

To learn more about Boolean values, refer

brainly.com/question/17933658

#SPJ4

7 0
2 years ago
In a network, servers receive requests from which of the following?
Margarita [4]

Answer: routers, which direct the data to the correct destination.

Explanation:

In a network, servers receive requests from the routers, which direct the data to the correct destination.

The router simply refers to the networking device which helps in the forwarding of data packets between the computer networks. When a data packet is sent through one of the lines, then the information regarding the network address will be read by the router which will help it in determining the destination.

5 0
3 years ago
Read 2 more answers
Mention one application of AI from the real world?
taurus [48]

The application of AI from the real world is the digital assistants. The benefit of using the digital assistants is that it helps in making the business more easy and reduces the burden of employees. The type of learning used is Supervised Learning.

<h3>What is Artificial Intelligence?</h3>

The AI is the application that combines the computer science with the robot datasets, that helps in problem solving. It makes the work easy for the human resources such as visual perception, speech recognition and many more.

The digital assistants is used in the companies in the form of solving the customer queries. It reduces the work load of employees of customer help desk.

Learn more about artificial intelligence, here:

brainly.com/question/22678576

#SPJ1

7 0
2 years ago
Other questions:
  • Your crt monitor flickers. what should you do
    6·1 answer
  • What is cryptocurrency ? I need to do a research one it please help!
    6·1 answer
  • 1.
    7·1 answer
  • What piece of software tells the operating system how to use a specific hardware device?
    14·1 answer
  • In a single statement: declare, create and initialize an array named a of ten elements of type int with the values of the elemen
    9·1 answer
  • I thought the answer was senior manager see on google it says
    8·1 answer
  • What is the most significant issue that needs to be addressed when ensuring the proper functioning of a computer?
    7·1 answer
  • Describe at least two other companies that are direct or indirect competitors to your company. Explain how you will differentiat
    15·1 answer
  • Assume the variable sales references a float value. Write a statement that displays the value rounded to two decimal points.Assu
    10·1 answer
  • List three variables that could be used in creating a model that determines the best day to plant corn in a given location. 30 p
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!