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
Which osi reference model layer includes all programs on a computer that interact with the network?
user100 [1]
<span>Which OSI reference model layer includes all programs on a computer that interacts with the network? The Application Layer</span>
5 0
3 years ago
What is it called when an attacker convinces you to enter personal information at an imposter website after receiving an email f
yaroslaw [1]

Answer:

Phishing

Explanation:

Phishing is a type of cyber attack in which the attacker masquerades as a trusted entity via e-mail and trick the recipient into clicking a malicious link that could steal user data including login details, credit card information e.t.c A phishing attack can have devastating effects such as Identity theft, Unauthorised purchase or stealing of funds on individuals.

The common types of phishing are<em>: Vishing, Smishing, Email Phishing, Search Engine Vishing, Whaling</em> e.t.c

3 0
4 years ago
Read 2 more answers
1. Technician A says you can identify a hybrid vehicle by the badging on the engine cover. Technician B says you can identify a
Liono4ka [1.6K]

Answer:

It's B i did the quiz

and got an 100%

Explanation:

Hope this helps :D

6 0
2 years ago
How does speech recognition software know what you are saying?
boyakko [2]
It converts the mic input into a string of raw data, then compares it to hundreds, even thousands of voice samples. The output is a polished string of data in words.
8 0
4 years ago
True or False: It is the CISO❝s responsibility to ensure that InfoSec functions are performed within an organization. A) True B)
algol [13]

Answer: True

Explanation: CISO(Chief information security officer) is the officer that is responsible for the information security(Infosec) function to be implemented in the organization.He/she manages the procedures, protect from the threats in business, secures the enterprise communication.

The post of CISO is considered as a senior level officer .The responsibilities of the CISO also includes getting along with other section of the organization and assuring about the smooth and secured processing of the business work as the aspect of information security.Thus the statement given is true

3 0
3 years ago
Other questions:
  • In three or four sentences, describe how a person buys and sells stock.
    6·2 answers
  • If a = 3 and b = a+3 find value of b.
    14·2 answers
  • Which is true about POP3 and IMAP for incoming email?
    10·1 answer
  • Analyze the following code.
    10·1 answer
  • Differences of a desktop computer and a laptop
    13·1 answer
  • Power point programm<br><br>​
    11·1 answer
  • How to get free PS5?
    8·2 answers
  • Use MPLAB to write an asemply program to multipy two numbers (11111001) and (11111001). Then save the product in file reisters 0
    8·1 answer
  • Sumit has created a procedure to draw a boat in Logo and saved it by the name, 'Boat'. Next day, when he tried to type the name
    14·1 answer
  • Which testing is used for a program's individual components functionality testing?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!