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
What is a data mining??
Nadusha1986 [10]
Data mining is the process in which large values of raw data are interpreted to extract something useful out of it. With the help of software, finding pattern using these large data is the main point.


Hope my answer would be a great help for you.    If you have more questions feel free to ask here at Brainly.
3 0
3 years ago
What is a critique of the feature detector model of object recognition?​?
Leya [2.2K]
Found a similar question that had choices, here are the choices:
a.Specific neurons that respond to round, square or irregular shapes do not integrate their signals to recognize multi-shaped objects.
b. It accounts only for the recognition of simple two dimensional shapes, not more complex three-dimensional shapes.
c.Feature detector neurons have been found in non-human primates, but not in humans themselves.
<span>d. It does not account for the fact that our expectations influence what we see.

My answer:
d. It does not account for the fact that our expectations influence what we see.

We all have different expectations, thus, our view on certain object is subjective. It is a product of said expectations. </span>
4 0
3 years ago
Hi, I am from India. Our brainly platform isn't so good, many of 'em keep spamming questions that I ask. US platform seems much
olga_2 [115]
It seems like a great county to visit, with many great views and tourist spots throughout.
7 0
3 years ago
Which of these statements about the truck driving occupation in the U.S. are accurate?
Airida [17]

Answer:

I'm unsure 38373672823

8 0
3 years ago
Read 2 more answers
I’m so lost. which username do i do.
koban [17]

Answer:

the username you feel like using

5 0
3 years ago
Read 2 more answers
Other questions:
  • The biggest factor in determining the price of a mortgage is:
    14·1 answer
  • The Internet and World Wide Web allow almost any business to be global. What are two important results of this process?
    8·1 answer
  • What's the difference between intranet and extranet ​
    9·1 answer
  • Assume that there is a class called BankAccountHolder that represents an individual member of a bank. There is also a BankAccoun
    5·2 answers
  • Como podemos calcular a média dos valores da Tabela acima no Excel? Assinale a alternativa correta
    11·1 answer
  • me pueden ayudar con mi trabajo sii porfss si me dan la respuesta correcta y les doy la mejor coronita si​
    12·1 answer
  • __________ is a broad class of software that is surreptitiously installed on a user's machine to intercept the interaction betwe
    6·1 answer
  • Please help me with coding!
    7·2 answers
  • 1.<br> _g<br> clue: fret; become worried<br> 2.<br> Fret become worried
    10·1 answer
  • You are creating a web page as part of a science project. Your role is to put your data on the webpage. You tracked the growth o
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!