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
In Python please.
Mazyrski [523]

Answer:

I dont know a lot about that but i know how to skeeo, i am reallyu good at sleeping.

Explanation:

7 0
3 years ago
Since the value we want to receive is either true or false, it makes the most sense to use:
EastWind [94]

Answer:

Logical Expressions

Explanation:

The expressions  that have logical statements which could be "true or false" are known as logical expressions. These types of expressions are also known as Boolean Expressions.

These expression are used in computer programming. The purpose of these expressions in programming is to make a decision that could be based on different conditions. These conditions could be true or false. This is the main reason that. logical expression makes best sense for values received in true or false.

8 0
3 years ago
What is word processing?
butalik [34]
A. Citing sources for documents you found on the web
3 0
3 years ago
Read 2 more answers
Tips to identify email scams.
malfutka [58]

Answer:

Explanation:

dont open or sign up to anything that seems to good to be true

7 0
3 years ago
If a firm puts Internet-facing servers directly in the Internet, they are exposed to threats of attack from anywhere in the worl
djverab [1.8K]

Answer:

True.

Explanation:

If a firm puts servers that are internet facing directly on the internet then the servers are exposed to external attacks and these attacks can be from anywhere in the world.

The server becomes vulnerable or unsafe and attackers can attack and can manipulate or tamper the server code from anywhere in the world.

8 0
3 years ago
Other questions:
  • Peter wants to submit his admission form online. What type of input element will allow him to enter his last name on the web pag
    6·1 answer
  • Which two sentences uses the colon correctly?
    13·1 answer
  • What is the use of form in HTML​
    12·1 answer
  • A small company is requesting a quote to refresh its wireless network. The company currently runs 60 autonomous APs and has plan
    13·1 answer
  • How do headphones work? (From pc)
    8·1 answer
  • Please list ten things that you have learned an Excel Spreadsheet can do.
    7·1 answer
  • What's the main idea??
    12·1 answer
  • Autumn suffers from nocturnal dyspnea. This term describes a breathing condition but using the prefixes to translate, it means:
    5·1 answer
  • How to determine the critical crack size for a<br> plate
    15·1 answer
  • Shadow and highlight create depth (3D).<br> TRUE OR FALSE
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!