subject

Which of the following answer choices best describes the algorithmic purpose of method num? /** Precondition: i==0; */

public static int num(int[] ray, int i)
{
if( i >= ray. length ){
return 0;
}
if( ray[i] % 2 != 0 ){
return 1 + num( ray, i+1 );
}
else{
return 0 + num( ray, i+1 );
}
}

a. The method is counting the number of numbers in ray.
b. The method is counting the number of even numbers in ray.
c. The method is counting the number of occurrences of x in ray.
d. The method is counting the number of odd numbers in ray.
e. The method is summing all of the numbers in ray.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
You have been supporting csm tech publishing's windows server 2016 server network for over a year. the office has two windows server 2016 servers running active directory and a number of other roles. management has informed you that a small sales office is opening in the same building three floors up. the sales manager wants to install a sales application on a server located in the sales office. this server will have limited physical security because there's no special room dedicated for it, which means it will be accessible to non-it personnel and visitors. you're considering installing windows server 2016 server core on the new server because accessing its console regularly probably won't be necessary, and this server will be managed from one of the other csm tech publishing servers. what are the benefits and drawbacks of using server core for this branch office? what are some things you should do to set up this server management environment?
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
You know the right answer?
Which of the following answer choices best describes the algorithmic purpose of method num? /** Pre...
Questions
Questions on the website: 13722360