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
sineoko [7]
2 years ago
13

Write the definition of a function named count that reads all the strings remaining to be read in standard input and returns the

ir count (that is, how many there are) So if the input was:
hooligan sausage economy
ruin palatial
the function would return 5 because there are 5 strings there.
Computers and Technology
1 answer:
spayn [35]2 years ago
8 0

Answer:

The function written in C++

int str(string word) {

int count = 1;

for(int i =0; i<word.length();i++) {

 if(word[i] == ' ') {

  count++;

 }

}

return count;

}

Explanation:

This line defines the function

int str(string word) {

This line initializes count to 1

int count = 1;

This line iterates through the input string

for(int i =0; i<word.length();i++) {

This line checks for blank space

 if(word[i] == ' ') {

Variable count is incremented to indicate a word count

  count++;

 }

}

return count;

}

<em>See attachment for full program</em>

Download cpp
You might be interested in
Late at night, some traffic signals change patterns and become _____.
SCORPION-xisa [38]
The answer is B.

Late at night, some traffic signals change patterns and become flashing yellow or red lights.
4 0
3 years ago
Read 2 more answers
Which code snippet is the correct way to rewrite this in Semantic HTML?
xxMikexx [17]

Answer:

<div id="header">

<h1>Waketech</h1>

</div>

<header><h1>Waketech</h1></header>

Explanation:

I think thats the answer your welcome

8 0
9 months ago
____________ refers to the computer-to-computer transmission of business data in a structured format.
motikmotik

Answer:

Electronic Data Interchange (EDI)

Explanation:

Electronic Data Interchange

It is the automated interchange of commercial information using a structured format. A process that allows a company to send information to another company electronically rather than on paper. Commercial entities that conduct business electronically are called business partners.

Numerous commercial documents can be exchanged using electronic data interchange, but the two most common are purchase orders and invoices. At a bottom, EDI interchanges the preparation and handling of mail associated with traditional commercial communication. However, the true power of EDI is that it standardizes the information communicated in commercial documents, which makes a "paperless" exchange possible.

6 0
3 years ago
Declaring a variable in the method’s body with the same name as a parameter variable in the method header is ___________.
icang [17]

Answer:

a. a syntax error

Explanation:

When the same variable name is repeated in the parameter set and the method body, it will result in a syntax error. This is because the variable in the parameter has a local scope within the method body. Now if we declare another variable with the same name in the method body, it will result in redefinition of the variable and violate the uniqueness principle of variable names in the method code. This will give rise to syntax error.

8 0
3 years ago
Many people describes computers as complex machine. what can this mean?
Airida [17]
They work in many different ways?
8 0
3 years ago
Other questions:
  • Use your own words to describe how IT/IS can support major functional areas in the business. Discuss at least two of these areas
    14·1 answer
  • Select the strategies below that are likely to increase audience attention.
    14·2 answers
  • What is the leading use of computers
    15·2 answers
  • In 2009, __________ accounted for 1,772 total fatalities. A. passengers riding with impaired drivers B. children hit by backing
    14·2 answers
  • What resources can be shared over a computer network?
    12·2 answers
  • Write a cash register program that calculates change for a restaurant of your choice. Your program should include: Ask the user
    11·1 answer
  • Write a small program that takes in two numbers from the user. Using an if statement and an else statement, compare them and tel
    12·1 answer
  • Three reasons Why we connect speakers to computers
    15·2 answers
  • Ask the user to input a word. Then, print the first letter, the last letter, and the length of the word on the same line with no
    6·1 answer
  • Which is the best choice to explain why a human resource manager is so
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!