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
The ____ section of the project plan should describe the major project functions and activities and identify those individuals w
harkovskaia [24]

Answer:

Option(c) is the correct answer to the given question .

Explanation:

The Project responsibilities section is responsible of the planning of project.

Following are the Roles of the Project Responsibilities

  • To check the objective of the project goals.
  • Works with customers and  to define and meet client needs and the overall objective .
  • Cost estimation and expenditure production of the project
  • Ensure the fulfillment of the client .Analysis and enterprise risk management. and Tracking the progress of project.

All the others options are not responsible of the planning of project that's why Option(c) is the correct answer .

7 0
3 years ago
Hisoka is creating a summary document for new employees about their options for different mobile devices. One part of his report
algol13

Hisoka would not include in his document that is Apple users file-based encryption to offer a higher level of security.

<h3>Does Apple use the file based encryption?</h3>

It is said that iOS and iPad OS devices are known to often use a file encryption system known to be Data Protection.

Therefore,  Hisoka would not include in his document that is Apple users file-based encryption to offer a higher level of security.

Hence option A is correct.

Learn more about encryption from

brainly.com/question/9979590

#SPJ1

3 0
2 years ago
Joe has just started the Security Module. He wants to get through it as quickly as possible and take the Quiz. As he clicks thro
Scorpion4ik [409]

Answer:

Joe should read the explanatory text and complete the learning activities.

Explanation:

Given

See attachment for options

Required

Best strategy to get through the module

First off, rushing through the activities and taking guess for each question (as suggested by (a)) will not help him;

He may complete the activities but sure, he won't learn from the module.

Also, reading through the units without completing the activities is not an appropriate method because Joe will not be able to test his knowledge at the end of the module.

The best strategy to employ is to read through the units and complete the activities, afterwards (option (b)).

4 0
2 years ago
What do you mean by an algorithm?<br>​
Over [174]
A program that can be used in many scenarios
8 0
2 years ago
Are sql injections legal?
natima [27]

Essentially, if you are seen to be someone who knows what you are doing, then even typing in a single-quote to a web form has been enough to be arrested and charged over in the past.

But lets say i'm writing a pen test tool that will be doing sqli testing and let it loose on sites that are 'out in the wild'. I'm not going to be doing dumps of any information. But is just the vulnerability scan itself illegal?



8 0
3 years ago
Other questions:
  • ________ sets up a point-to-point connection between two computer systems over an Internet Protocol (IP) network. A. Point-to-Po
    15·1 answer
  • The term composite would be used to describe an image that was altered by the Crop tool.
    15·1 answer
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • Which of the following statements are true?
    11·1 answer
  • In the early days of photography, cameras were limited to professional photographers because of the knowledge needed to work the
    9·2 answers
  • First let 2161965 answer<br> and then you ..
    11·2 answers
  • What is the base of a number system?
    8·1 answer
  • . What process skill would a scientist use to find the length of a line
    5·1 answer
  • (100 points) why does file explorer look like this and how do I fix it? I'm not good with computers, and I kinda need help
    13·1 answer
  • Computer are most wonderful creation of 21st century how ?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!