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]
2 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:
Ivan2 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 is outlook used for?
Arte-miy333 [17]
Outlook is used for mainly emails. It also keeps track of your calendar, has contact and tasks.
4 0
2 years ago
Read 2 more answers
Communication is used to satisfy instrumental goals, which means ________ .
Ann [662]
Communication comes in lots of types, therefore, it also has lots of goals and purposes. One of the purpose of communication is to satisfy instrument goals. Instrument goals here refers to the goal that focuses on convincing others to act in an appropriate way. This is most applicable in situations when someone had to deal with others. 
3 0
3 years ago
Read 2 more answers
Find the number of ways in which a committee of 4 can be chosen from six boys and
natima [27]

Answer:

465 ways

Explanation:

Atleast 1 girl and 1 boy

Possible combinations :

1 girl ; 3 boys = 6C1 ; 6C3

2 girls ; 2 boys = 6C2 ; 6C2

3 girls ; 1 boy = 6C3 ; 6C1

(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)

Combination formula:

nCr = n! ÷ (n-r)!r!

We can also use a calculator :

6C1 = 6

6C3 = 20

6C2 = 15

Hence,

(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)

(6 * 20) + (15 * 15) + (20 * 6)

120 + 225 + 120

= 465 ways

6 0
2 years ago
Which statement opens a text file so that you can retrieve the information it contains?
vesna_86 [32]

Answer:

Answered below

Explanation:

aFile = open("books.txt", "r")

This code uses the function open() which takes two parameters. The first parameter is the file name while the second parameter is the mode in which you are accessing the file.

The "r" mode opens the file in a reading state. That is, you can only read from the file. This code completes the reading process

aFile.read( )

The "w" mode opens the file so you can write to it and make changes.

The "a" mode opens the file so you can add contents to it.

3 0
2 years ago
In database systems, the dbms enforces rules about which user can perform which action when. The rules are known as ________.
saw5 [17]

I guess the correct answer is concurrency control

Cοncurrеncy cοntrοl is a databasе managеmеnt systеms (DBMS) cοncеpt that is usеd tο addrеss cοnflicts with thе simultanеοus accеssing οr altеring οf data that can οccur with a multi-usеr systеm.

In database systems, the DBMS enforces rules about which user can perform which action when. The rules are known as concurrency control.

6 0
2 years ago
Other questions:
  • What is a browser? Give one example
    8·2 answers
  • The motion of any object can be broken down into it's component (parts of) vectors. true or false
    9·2 answers
  • Access Control can be defined as putting controls (or countermeasures) in place to help achieve information security goals. Whic
    13·2 answers
  • Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing
    11·1 answer
  • In terms of data storage and sharing, in what way, if any, do dropbox services differ from archiving services?
    8·1 answer
  • each term to the appropriate definition. DBMS data mining hash file index key field locking protocol relation roll back schema S
    14·1 answer
  • Search engines use indexes created by web _________ to provide fast searches.
    7·1 answer
  • Write a program that grades arithmetic quizzes as follows: Ask the user how many questions are in the quiz. Ask the user to ente
    12·1 answer
  • Mavis is considering signing up for a hosted enterprise software solution for her small business. She recognizes that an advanta
    15·1 answer
  • What are three ways of verifying legitimate right of access to a computer system?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!