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
Contemporary Information Systems are interfacing with customers andsuppliers using:A. Electronic commerceB. CRMC. SCMD. all of t
ch4aika [34]

Answer:

D. all of the above

Explanation:

Contemporary Information Systems are interfacing with customers andsuppliers using, electronic commerce, CRM, and SCM.

7 0
3 years ago
What will happen if you type pseudocode in another language's programming environment and try to run the
wariber [46]

Answer:

You will get compile error

Explanation:

7 0
3 years ago
Organizations should communicate with system users throughout the development of the security program, letting them know that ch
Fed [463]

Answer:

Yes it is true.The organization should indeed communicate with a system user throughout the development of a security program. A corporation needs a security policy that must be developed by management at all levels, including organization and employees at the operational level. For a corporate security plan, it is essential to reduce the resistance of the expected changes and define the objective.

Explanation:

Three objectives of the security plan in an organization are:

  • Identify the sensitive system and plan
  • Create and define the strategy and control of the system.
  • Develop and implement the training programs.

Security Information is one of the essential factors in the organization.For an organization, the information should be protected.

7 0
3 years ago
CAD software is used to_____. / create a printed document to send through a fax machine / enhance a photograph / design a buildi
Umnica [9.8K]
CAD software is used to design a building.
4 0
3 years ago
Read 2 more answers
Question 1
anastassius [24]

Answer:

51 \frac{y81 >  \leqslant  =  \times  - 9 {55lol \: noob \times \frac{?}{?} }^{2}  \times \frac{?}{?} }{?}

8 0
3 years ago
Other questions:
  • Carson's supervisor has asked him to review a variety of portable computers for possible purchase for their company's employees.
    13·1 answer
  • The PICC team is scheduled to remove a PICC before client discharge. Assessment of the catheter indicates the PICC and determine
    7·1 answer
  • The city government of Los Angeles recently upgraded its information technology infrastructure​ and, for the first​ time, implem
    14·1 answer
  • Identify any eight new programming languages and classify them based on their functionality.
    14·2 answers
  • Describe the 3 different types of authentication
    6·2 answers
  • Concerning Structured Cabling, select the statement that is true, or select, "All statements are false."
    5·1 answer
  • Connect 5 LEDs with any random colors. Iteratively, turn ON 1 to 5 LED(s) that will take 5 iterations in total, and in every ite
    6·1 answer
  • Determine whether or not the following pairs of predicates are unifiable. If they are, give the most-general unifier and show th
    13·1 answer
  • Who Is faster sonic or flash well it all depends on which version of sonic your talking about like for example video game sonic,
    14·1 answer
  • In terms of computer hardware, where does the actual work of computing take place?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!