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
Blizzard [7]
3 years ago
7

Given the following function definition, what modifications need to be made to the search function so that it finds all occurren

ces of target in the array?int search(const int array[], int target, int numElements){int index=0;bool found=false;while((!found) && (index < numElements)){if(array[index] == target)found=true;elseindex++;}if(found==true)return index;elsereturn -1;}a. Add another parameter to indicate where to stop searchingb. Add another parameter to indicate where to start searchingc. This already can find all occurrences of a given targetd. Have the function return the whole array
Computers and Technology
1 answer:
svet-max [94.6K]3 years ago
8 0

Answer:

D. have function return the whole array

Explanation:

the given function only return first occurrence of target. In order to get all occurrences of target we have to change condition in while loop to check whole array even if first occurrence of target found and plus add another parameter of type array that will store different  indexes of occurrence of target and return that array

You might be interested in
Can someone follow my tt its c1ndy.dont.miss
Stells [14]

Answer:

hiii

Explanation:

kk ill follow you do you have any vids

5 0
3 years ago
With _______, applications are owned, delivered and managed remotely by one or more providers over the Internet or an intranet,
vfiekz [6]

Answer:

EMAIL

Explanation:

3 0
3 years ago
How did The Gates by Christo and Jeanne-Claude affect the site?
Nadusha1986 [10]

Answer:

C. The experience of the park with The Gates was so different that some people saw the park in a new way.

Explanation:

The couple, Christo Javacheff and Jeanne-Claude Denat based in New York were two top contemporary artists who formed collaborative arts.

On the 3rd of January, 2005 they both made an art work known as The Gates, in Central Park.

The experience of the park with "The Gates" was so different that some people saw the park in a new way.

8 0
3 years ago
Read 2 more answers
Rutherford concluded from his calculations that the volume of an atom is filled with protons, neutrons and electrons. is mostly
enyata [817]

Answer:

The answer is "is mostly empty space".

Explanation:

In the given question option numbers is defined, so the explanation to this question  as follows:

The volume of an element holds one mole at high temperatures. The nuclear mass is usually indicated by mole: cc/mol in the \ cm^3. It is also known as a quantity, in which the same molecule was the measured values based on atomic mass as well as the thickness of both, and certain alternatives were wrong which can be explained as follows:

  • atom doesn't fill the protons, neutrons, and electrons.
  • It can't revolve with outside atoms and electrons.

6 0
3 years ago
What are at least three tips to taking photographs of insects? Why would following the tips help create better photographs?
Ber [7]

1) Use a good cam 2) Make sure you focus on it 3) Make sure you snap it at the right time....    I hope this helps!!!!!

7 0
3 years ago
Other questions:
  • Jim has entered the age of each of his classmates in cells A1 through A65 of a spreadsheet. Which function should Jim use to fin
    11·2 answers
  • How can i add card reader to pc answers?
    9·1 answer
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    15·1 answer
  • Which routine is configured to be called by another routine?
    10·1 answer
  • Match each task with the features necessary to complete the task
    10·1 answer
  • Does anybody know if that apple watch is actually worth what it costs?
    9·2 answers
  • Based upon what you know
    5·1 answer
  • What do you call the spreadsheet cell that is in effect and has a heavier black border around it?
    7·2 answers
  • Mac or PC (need opinions please)<br><br> Why did you choose Mac/PC?
    10·2 answers
  • Why is 0.3333333333333333 the output of print(1/6 + 1/6) in python?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!