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
ELEN [110]
3 years ago
11

The procedure call mystery(38) will yield which output? __________ a) 0 12 b) 12 0 c) 1 1 0 2 d) 1 1 1 1 e) 2 0 1 1 public void

mystery (int n) { if (n>2) mystery (n % 3); System.out.print( (n / 3) + " " ); }
Computers and Technology
1 answer:
Ivan3 years ago
3 0

Answer:

Option b is the correct answer for the above question.

Explanation:

  • The mystery function is a recursive function that calls for the two times when the user passes 38 on the argument.
  • The first value is 38 and the second value is 2 for which that function is called.
  • When the value 38 is passed, then again 2 is passed because of the "mystery (n % 3);" statement.
  • This statement holds by the if condition which gives the true when the argument value is greater than 2.
  • Hence for the 2 value the if condition will not true and the function is not called again.
  • Then the 38/3 and 2/3 are printed whose value is 12 0, but it will print 0 12 because of the recursive function.
  • Hence option b is the correct answer while the other is not because other options does not states the output of this program.
You might be interested in
WHAT 1 + 1 ???? ???????????????????
antiseptic1488 [7]
The answer to this is 11
5 0
3 years ago
Read 2 more answers
Given the following snippet of code, answer the following two questions based on the code: typedef enum {Sun, Mon, Tue, Wed, Thu
ANEK [815]

Answer:

1) The value of x will be 6.

2) The value of y will be 7.

Explanation:

1) The value of x will be 6.  

The enum values are labeled by default from 1. This means that Sun = 1, Mon = 2, Tue = 3 and so on.  

So, x = Mon = 2 and y = Sat = 6  

x increases up to y = 6 in the while loop.  

and then y also increments by 1.  

2)So the value of y = 7.  

You will need actual printf("Sun") or printf("Mon") for printing the actual text for the enum.

7 0
3 years ago
These tools gather information from sources such as emails, text messages, and tweets and make the information instantly and pub
babunello [35]

Answer:

Crisis-Mapping

Explanation:

Social networks are characterized by the immediacy of the content that users produce, and that same feature can be transferred to the online mapping of crises and conflicts.

Characteristics Crisis-Mapping:

  • Real-time information processing.
  • Immediacy;
  • Visualization of the aggregated information can allow the detection of patterns that cause new analyzes to be undertaken or work hypothesis to verify.
  • Continuity in the tasks, the maps record activity without interruption during the twenty-four hours of the day and seven days per week.
  • Flexibility in the protocols, since the tasks are distributed and evolve according to the dynamics (the crisis maps evolve with the crisis itself).
8 0
3 years ago
Este tipo de software sirve para controlar e interactuar con el sistema operativo, proporcionando control sobre el hardware y da
attashe74 [19]

Answer: c

Explanation:

4 0
2 years ago
Moving your Sprite top to bottom is moving along the X coordinate?
Marianna [84]
The answer is false
6 0
3 years ago
Other questions:
  • The Table Tools tab provides which two additional tabs?
    5·1 answer
  • 4. Extrusion tools in Blender® duplicate vertices while keeping the geometry connected with the original vertices. (1 point)
    7·1 answer
  • What sugar is used in a DNA molecule​
    7·2 answers
  • Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0;
    8·1 answer
  • How do you get a crown on this website<br> look under your points on the right side of your picture
    15·2 answers
  • The function below takes two numeric parameters. The first parameter specifies the number of hours a person worked and the secon
    13·1 answer
  • True or false scientists investigate and seek to explain the natural world
    14·1 answer
  • Make variables to represent the length and width of a rectangle, called length and width, respectively. You should set length to
    7·1 answer
  • Which of the following is an example of machine learning?
    5·1 answer
  • Python Programming
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!