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
All of the following are guidelines for maintaining an engineering notebook EXCEPT
gayaneshka [121]

C) numbering pages at the bottom inside corner

An Engineering notebook is a legal document made of bound, grid paper where engineers formally document written ideas, sketches, work session summaries, research findings and interview information in chronological order.

When not in use, the notebook should be stored in a safe location with each page dated and signed.

There will absolutely no situation where a page is removed.

All entries should start at the top of each page and ending at the bottom. Supporting material should be permanently affixed.  

Book pages should be numbered on the top right side of the page.  


6 0
3 years ago
How do you do these two questions? The first might have multiple answers and the second will have only one answer.
Svetlanka [38]

Answer:

1. Generally Linkedlist is used, but you can also use the queue. Hence both linked list are queue are correct options. However, treeset is sorted and hashset is not sorted, and hence we cannot make use of the treeset. Similarly the stack cannot as well be used as a Hashset.

2. D. Additional cells in the same hashset are examined and the index is incremented by a fixed value each time.

Explanation:

The 2 deals with the linear probing, and what is meant as option in 2 is what we know as linear probing in hashset, and we do have quadratic probing and double probing as well.

6 0
3 years ago
What does BMP stand for?
OverLord2011 [107]
Hello there!

It is Bitmap.

Hope This Helps You!
Good Luck :)
6 0
3 years ago
Read 2 more answers
How to build a 5*32 decoder by using 3*8 and 2*4 decoders? (digital design)
quester [9]
Assuming decoders with enabler.
input with rectangle is the ENABLE input.
wire with "/" on it is a bundled wire with multiple values to save drawing space.
In1 is MSB, In5 is LSB.

messy drawing as I'm in vehicle.

8 0
3 years ago
Best practices and trends for technology integration
cluponka [151]

Answer:

Technology use must be aligned to the standards. Technology must be integrated into daily learning,

Explanation:

Technology use must be aligned to the standards. Technology must be integrated into daily learning, not used as an add-on to instruction to match personal learning needs. Students need opportunities to use technology collaboratively. Technology must support project based learning and include real-world simulations.

3 0
3 years ago
Other questions:
  • Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift
    5·1 answer
  • Which of these is important to consider before believing health or fitness information you find online? Where the information wa
    5·2 answers
  • You run anti-virus software on your computer; however, you are experiencing symptoms that may be caused by a virus. What should
    13·1 answer
  • When you type into a basic search engine like Google, Bing, or Yahoo!, the sites that appear at the top or on the side of the re
    7·1 answer
  • A customer seeks to buy a new computer for a private use at home.The customer primarily needs the computer to use the Microsoft
    8·1 answer
  • What is the purpose of indexing?
    15·2 answers
  • Think of a genre (science, music, math, sports, video games, etc.) and create at least 10 questions. You can decide whether you
    12·2 answers
  • A(n) ___ is a set of CPUs which work in parallel in an attempt to simulate the way the human brain works, although in greatly si
    5·1 answer
  • Daily IT Question
    13·2 answers
  • What is the average value of a loyal customer (VLC) in a target market segment if the average purchase price is $75 per visit, t
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!