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
1110011*110011 binary multiplication
Ganezh [65]

122113420121

Explanation:

8 0
3 years ago
Read 2 more answers
If Mike saves $160 each month, how much will he save in 12 months? Enter your answer in the box.
denis-greek [22]

Answer:

$1,920

Explanation:

i think its that bc 160 x 12=1,920

im sorry if wrong but if right can i get brainlest?

7 0
2 years ago
Which strategy would most likely improve a student's reading comprehension?
Fynjy0 [20]

Answer:

I think asking questions is the best.

Explanation:

I believe asking questions are the best because you get to understand the text which is really good. Some 7th grade reading teachers can help you a lot and you can use iLit to help a bunch.

8 0
3 years ago
Read 2 more answers
A business wants to centralize its administrative tasks. At the same time, it wants the existing systems to manage and sustain t
asambeis [7]

Answer:

personal information management

Explanation:

In other to ensure that required information regarding basic tasks which are required, personal information management helps attain this seamlessly by systematically studying the activities which are being performed in other to or for task such as storing, retrieving, creation. Maintainance and organization of information. With personal information management, tasks are segmented and organized in a tidy and effective manner such that the right, complete and quality information is made available at all times in other to ensure that nothing is missed or lacking.

5 0
3 years ago
Read 2 more answers
At Tech Edge Inc., a special team is set up for making a robot capable of assisting blind people in daily activities. The member
Ivan

Answer: Cross-functional team

Explanation:

Cross-functional team is the community of people that have expertise quality in different functions to perform and attain a common aim.

  • The fields that are involved in different function are financial department, HR(Human resource) department ,operation team,marketing team etc. in an organization
  • According to the question, new team formed under the senior manager is a cross-functional team.
  • Members of different area such as research and development,manufacturing, marketing etc are gathered togather as a team so that they can work towards the robot project.
6 0
3 years ago
Other questions:
  • What types of issues can you most likely resolve by knowing how to access and use the control Panel?
    15·1 answer
  • A user can easily moved to the end of document by pressing what key combination?
    8·2 answers
  • How can you make a circle in JavaScript? Thank you!
    9·1 answer
  • Dustin runs a command at the command line trying to find out what kernel version the system is running. However, it doesn't give
    12·1 answer
  • Read the following example cover letter: To Ms. March: I was excited to see your opening for a customer support specialist with
    13·1 answer
  • How do you know if something is in the public domain
    5·1 answer
  • Light the<br> Spark hop<br> Answer if ur a baddie;)))
    9·2 answers
  • Keli is unable to find a shape that meets her needs. Which feature in Power Point should she use to create shapes that are compl
    6·1 answer
  • What is 2+2 I need to know hurry
    12·2 answers
  • Who is the best nfl team in your mind
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!