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

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; else index++; } if(found==true) return index; else return -1; } a. Add another parameter to indicate where to stop searching b. Add another parameter to indicate where to start searching c. This already can find all occurrences of a given target d. Have the function return the whole array
Computers and Technology
1 answer:
Naddika [18.5K]3 years ago
7 0

Answer:

The answer is "Option b".

Explanation:

In the given question, a function "search" is defined. That searches element that is passed in the function by parameter. To search more quickly we must add another parameter in the function. and other options are not correct that can be described as:

  • In option a, We add another element in parameter to start searching not to stop.
  • In option c, The function can not find an element that occurs in the array target.
  • In option d, Function will not return array it will return only index value.

You might be interested in
Write a simple algorithm in pseudocode that asks the user their favourite colour and then agrees with their choice, quoting the
olga55 [171]

Answer:

i am still a beginner in this but i hope it helps.

  • add scanner object;
  • declare string FavColour;
  • print msg to ask user for input
  • scan input FavColour;
  • print msg (" your favourite colour is " + FavColour)

3 0
3 years ago
A developer needs to create a visualforce page that displays case data. The page will be used by both support reps and support m
shutvik [7]

Answer:

B. Use a new support manager permission sets

Explanation:

According to the requirements, field level security is required so, 1st options is not suitable because it may reduce the maintenance cost but increase the risk of security.

By creating a separate page for each of the two, it will leads to increase in the maintenance cost of the system. So <u>Option C</u> is also not suitable.

Option B is more Suitable as compared to others, that <em>Create a new support manager permission set</em>, with the help of this, both of Support rep and Support manager can visualize their required information with the help of support manager permission. This solution will not compromise the security and not increase the maintenance cost.

7 0
3 years ago
Chase lives in Oregon but works for a company that is located in Florida. What business trend is this an example us?
shtirl [24]

Answer:

The business trend wherein Chase works for a company that is located in Florida while he is living in Oregon is an example of remote workforce business trend.

Remote workers are those workers who does their job outside of a customary type of office.

8 0
4 years ago
Read 2 more answers
What is the best approach to integrating domain-specific needs? Why is this approach better than others?
Makovka662 [10]

Answer:

Integrating domain information system increase the level of the organization and its efficiency in the specific domain. This approach is better than others because it first planned the system in systematic order and then it is implemented by proper testing so that the system does not fails and it give efficient result.

It is the low cost approach which can be easily used by the various companies and give faster and profitable results.  This integrating approach must be domain specific and describe different level of abstraction.

7 0
4 years ago
Your network consists of three sites and two domains, with some computers from both domains at each site. Each site has certain
Zinaida [17]

Answer:

Create three GPOs, one for each site, with the appropriate security settings. Apply the GPOs to the corresponding site, and enforce the GPO.

3 0
3 years ago
Other questions:
  • Write the getNumGoodReviews method, which returns the number of good reviews for a given product name. A review is considered go
    14·1 answer
  • What is the energy conversion of solar water heaters?
    12·1 answer
  • What is an Apple Pen?
    5·2 answers
  • Why would Network Systems employees be employed by the government?
    12·2 answers
  • Which of the following are the dimensions of feasibility? Group of answer choices cost, schedule, technical, and organizational
    14·1 answer
  • Discuss the main characteristics of the database approach and how it differs from traditional file systems.
    14·1 answer
  • What is the term used to describe the basic unit of data passed from one computer to another
    14·1 answer
  • The _______ within a story are the people and/or objects that the story is about
    5·2 answers
  • What is ‘situational awareness” in game design?please answer in a full sentence!
    10·1 answer
  • Which of the following makes Super Mario Run unique?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!