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]
3 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]3 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
5. In what ways is the human brain like a computer? In what ways is it different?
yan [13]

Answer:

Similar to a computer, the human brain is like a storage unit of information and operator for the human body. Though the brain can hold more info than a computer, both are used to complete various tasks.

Explanation:

5 0
3 years ago
Read 2 more answers
What is one way to process your thoughts about the information you are reading?
tatuchka [14]
Make a connection to what you already know about the material
4 0
3 years ago
The variety of theatre introduced in the 1960s that denotes semi-professional or even amateur theatre in the New York/Manhattan
antoniya [11.8K]

Answer:

The answer is letter A. TRUE

Explanation:

The variety of theatre introduced in the 1960s that denotes semi-professional or even amateur theatre in the New York/Manhattan area, often in locations such as church basements, YMCAs, and coffeehouses, is commonly known as off-off-Broadway.  This statement is true.

3 0
3 years ago
If it is impractical to place guest users in a secure network, isolated from the production network by firewall barriers, then:
IgorLugansk [536]

Answer:

specific areas of access should be determined and they should be as restrictive as possible.

Explanation:

According to my research on security features of networks , I can say that based on the information provided within the question then specific areas of access should be determined and they should be as restrictive as possible. This would provide the highest level of security while still allowing production to be smooth.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Tara needs to select all of the text in a Word document. Which keyboard shortcut will achieve this goal?
user100 [1]
Ctrl + a im pretty sure
3 0
4 years ago
Read 2 more answers
Other questions:
  • Selecting the option to control Widows and Orphans will prevent _________. A single line from appearing at the top or bottom of
    10·1 answer
  • What is a directory server?
    5·1 answer
  • the piece of hardware that contains the circuitry that processes the information coming in to the computer
    13·1 answer
  • Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr
    15·1 answer
  • Which of these is the largest?<br> terabyte<br> exabyte<br> gigabyte<br> kilobyte<br> PLEASE HELP
    5·1 answer
  • Who found the first computer bug in 1947, and invented the concept of a compiler in 1952
    6·1 answer
  • Is a pocket watch consider a computer
    15·1 answer
  • If Anime Characters were real , Who Would Your Anime Wife Would Be (Tell Who And Why)
    10·1 answer
  • Write a user input program that simulates a game of a rolling pair of dice. You can create/simulate rolling one die by choosing
    10·1 answer
  • Read each of the following statements about Computer Science and explain why you think that statement is true.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!