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
Is used to process certificates and private/public key information?
Luda [366]
<span>SSL is used to process certificates and private/public key information. </span>SSL stands for Secure Sockets Layer. It is cryptographic protocols <span> that creates a trusted environment and </span>provides communications security over a computer network. The SSL protocol is used for establishing encrypted links between a web server and a browser.
4 0
3 years ago
NO LINKS OR I WILL DELETE YOUR FORTNITE ACCOUNT
ozzi

Answer:

can i have ur fortnite account if u hav one and dont use it :) i only say that cuz u mentioned fortnite

Explanation:

with the free version you can add effects (cheap effects) cut the video, crop some parts. and posting leaves a watermark until u buy money

5 0
3 years ago
Write a calculator program that will allow only addition, subtraction, multiplication &amp; division. Have the
ozzi

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

operation = input("Which operation are you performing? (a/s/m/d) ")

if operation == "a":

   print("{} + {} = {}".format(num1, num2, num1+num2))

elif operation == "s":

   print("{} - {} = {}".format(num1, num2, num1-num2))

elif operation == "m":

   print("{} * {} = {}".format(num1, num2, num1*num2))

elif operation == "d":

   print("{} / {} = {}".format(num1, num2, num1/num2))

I hope this helps!

8 0
2 years ago
The text discusses three approaches to combining overall cost leadership and differentiation competitive advantages. Which of th
dedylja [7]

Answer:

C. deriving benefits from highly focused and high technology markets

Explanation:

Firms that engage in cost-leadership approach seek to combine a low per-unit income with large sales for profit making purposes. Typically, but not always, they are more inclined to market their products and services to a large population base or a niche with a high demand volume. While differentiation enables a company to accomplish a competitive advantage. A Competitive advantage enables a company to achieve more strides over other companies offering related product substitutes. It is an important marketing process that is of critical economic importance to a business.

It should be noted that deriving benefits from highly focused and high technology markets is not part of the approaches to combining overall cost leadership and differentiation competitive advantages.

3 0
3 years ago
TIME REMAINING 01:48:57 What is the purpose of the website directory provided by the website host? to look up user account infor
muminat

Answer:

Cookie

Explanation:

its just because and also the answer is right on e 2020.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which sentences in the passage show the preventive measures to avoid data breach?
    9·1 answer
  • Why is driving a privilege?
    15·2 answers
  • Your computer running Windows 7 is doing some very strange things with the operating system. You are fairly certain it is not a
    10·1 answer
  • Suppose that a machine with a 5-stage pipeline uses branch prediction. 15% of the instructions for a given test program are bran
    13·1 answer
  • Microsoft acknowledged that if you type a res:// url (a microsoft-devised type of url) which is longer than ____ characters in i
    9·1 answer
  • ossless compression tools generally use either Huffman coding or Lempel-Ziv-Welch (LZW) coding. Discuss the advantages and disad
    8·1 answer
  • John works in the Sales and Marketing group. Why does his group need to interact with operations management to plan the launch o
    12·1 answer
  • How much would it cost to get the screen replaced on a Moto G7?
    10·1 answer
  • What is a file and where can we make use of a file?​
    14·1 answer
  • Maia is typing her report on meerkats for her biology class.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!