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
Different the policies and protocols in the industry
Rashid [163]

Answer:

7ALWAYS KEEP FOCUS on brainly and I am have been a

8 0
2 years ago
Rosanna is a middle school teacher. She has installed a spreadsheet program in her computer that tracks the grades and attendanc
Lana71 [14]

The computer software that should be installed on Rosanna's computer is application software.

The information regarding the application software is as follows:

  • It is the software where the activity is to be performed.
  • The example like a spreadsheet software, presentation software, database software, etc.

Therefore we can conclude that the computer software that should be installed on Rosanna's computer is application software.

Learn more about the software here: brainly.com/question/1022352

8 0
3 years ago
A user complains that his computer automatically reboots after a short period of time. Which of the following computer component
Oduvanchick [21]

Answer:

The answer is "option a".

Explanation:

To resolve the automatic reboot problem we must change the CPU cooling fan because if we don't change a computer fan so, it will be heated and damage other components. This cooling fan used inside the CPU. It expels warm air from inside and moves air across the particular component. and other options are not correct that can be described as:

  • In option b, power supply is used to turn on the computer. It is not used to solve the reboot problem.
  • In option c,  Motherboard is to serve as the base upon which a computer's components are built.  
  • In option d, It is primarily used to store the data.  

6 0
3 years ago
An important safety precaution you should take before starting any electrical servicing job is to make sure that your
monitta
I'm pretty sure it's B. body is not grounded
5 0
3 years ago
Read 2 more answers
Which property is assigned to a file by the operating system?
Zolol [24]
Your answer would be a type
7 0
3 years ago
Other questions:
  • What would be the desired output of a home security system?
    6·1 answer
  • The left column values in a table array are called table ____
    13·1 answer
  • Given the following class import java.util.ArrayList; public class RectangleTester { public static void main(String[ ] args) { A
    7·1 answer
  • What allows a person to interact with web browser software?
    13·2 answers
  • Data governance consists of? A. the processes, methods, and techniques to ensure that data is of high quality, reliable, and uni
    11·1 answer
  • Q1 To remove filter
    15·2 answers
  • Both instructions and data in a digital<br>computer are represented as binary<br>digits. True False​
    13·1 answer
  • Keyshia wants to add movement to her PowerPoint presentation. Which tab should she use to complete this task
    15·2 answers
  • Are you absent minded because you are thinking of an online activity?​
    12·1 answer
  • Which of the following is not a common input device?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!