subject

Consider the following recursive method, which is intended todisplay the binary equivalent of a decimal number. For example, toBinary(100) should display 1100100. public static void toBinary(int num)
{
if (num < 2)
{
System. out. print(num);
}
else
{
/* missing code */
}
}
Which of the following can replace /* missing code */ so thattoBinary works as intended?

a. System. out. print(num % 2);
toBinary(num / 2);
b. System. out. print(num / 2);
toBinary(num % 2);
c. toBinary(num % 2);
System. out. print(num / 2);
d. toBinary(num / 2);
System. out. print(num % 2);
e. toBinary(num / 2);
System. out. print(num / 2);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
question
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
question
Computers and Technology, 25.06.2019 10:00
*jenny is preparing a presentation on the health statistics of the 10 most populated countries. she wants to apply a blinking effect to the names of the countries, and a motion effect between the exit and entry of every slide. which options should she use? jenny should use the option to apply a special blinking effect to the names of the countries and the option to apply a motion effect between the exit and entry of every slide.
Answers: 2
You know the right answer?
Consider the following recursive method, which is intended todisplay the binary equivalent of a deci...
Questions
question
Physics, 19.08.2019 08:00
question
Mathematics, 19.08.2019 08:00
question
Mathematics, 19.08.2019 08:00
Questions on the website: 13722363