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
Elena-2011 [213]
3 years ago
14

The elements of an integer-valued array can be set to 0 (i.e., the array can be cleared) recursively as follows: An array of siz

e 0 is already cleared; Otherwise, set the last of the uncleared elements of the array to 0, and clear the rest of the array Write a void method named clear that accepts an integer array, and the number of elements in the array and sets the elements of the array to 0.
Computers and Technology
1 answer:
dangina [55]3 years ago
4 0

Answer:

The method definition to this question can be given as:

Method definition:

public void clear(int[] arr, int num) //define method clear.

{

   if (num == 0) //if block

{

       return 0;  return value.

}

else //else block

{

 arr[num - 1] = 0; //assign value in arr.

return arr[];  //return value.

}

}

clear(arr, num - 1);   //calling

Explanation:

The description of the above method definition as follows:

  • Firstly we define a method that is "clear" that does not return any value because its return type is "void". This method accepts two integer variables that are "arr[] and num" where arr[] is an array variable and num is an integer variable.
  • Inside a method, we use a conditional statement in if block we check that num variable value is equal to 0. if this condition is true so, it will return 0 otherwise it will go to else block in else block it will assign value in variable arr[num-1] that is "0" and return arr value.

You might be interested in
What are the odds that you find someone you know in person on here
jenyasd209 [6]

Answer:

0

Explanation:

As far as I know, no one I know, even knows that brainly exists. Those who do  know about it don't use it.

6 0
2 years ago
Which action does not happen in each iteration of the repeat loop in the
iren2701 [21]

B. The number of sharks decreases. Explanation: hope it's help i learned about it and you too

7 0
2 years ago
Identify tags and attributes in HTML 5
Vaselesa [24]

Answer:

Tags can be identified as they are written as <tagname> Something </tagname>

<tagname> this tag is called start tag.

</tagname> this tag is called as end tag.

for ex:<p> This is a paragraph </p>

There are some elements with no end tag.for ex:- <br> tag.

Attributes are used to provide additional information to an HTML element.

Every element can have attributes.

for Ex:- <h1 style="background-color:red";>MY WEBSITE </h1>

So the background of h1 will become red.

7 0
2 years ago
Which app is not a free app that your Microsoft account gives you access to
Ilya [14]

I believe the answer is Microsoft Office, Correct me if I'm wrong.

Really hope this helps!

5 0
3 years ago
)Dynamically allocate an object of Banana, using the pointer variable daco.
zepelin [54]

Answer:

d) daco = new Banana;

Explanation:

Dynamically allocated variables have their memory allocated in the heap memory.We declare a dynamical variable like this:-

int *a=new int ;

It means a pointer a is created on the stack memory which hold the address of the block that hold the value of variable a in heap memory.

We already have the pointer daco. We just have to initialize with keyword new.

It will be like daco=new Banana; which matches the option d.

5 0
3 years ago
Other questions:
  • Some files appear dimmed in one of the default folders on your computer. What would be the best course of action? A. Leave the f
    5·1 answer
  • A work-study student receives a paycheck from:
    15·2 answers
  • How many check boxes from the following code can be selected at any given time? Home Address Federal Express UPS
    13·1 answer
  • Write a function in Java that implements the following logic: Given a string and an int n, return a string made of n repetitions
    15·1 answer
  • package dataStructures; /** * Class OrderedLinkedList. * * This class functions as a linked list, but ensures items are stored i
    8·1 answer
  • Certain files, such as the ____ and Security log in Windows, might lose essential network activity records if power is terminate
    9·1 answer
  • The advancements in which of the following technologies has most changed the American job market in recent years?
    14·2 answers
  • Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied
    15·1 answer
  • Computing devices translate digital to analog information in order to process the information
    12·1 answer
  • ________ can be written only once. The data cannot be erased or written over once it is saved.​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!