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
epic poem - long narrative poem about heroic deeds about pharrell williams of the happy song please help i need the right answer
Naddik [55]

"Happy" is a song written, produced, and performed by American singer Pharrell Williams, released as the first and only single from the soundtrack album for the film Despicable Me 2 (2013). The song was first released on November 21, 2013, alongside a long-form music video. The song was reissued on December 16, 2013, by Back Lot Music under exclusive license to Columbia Records, a division of Sony Music.[1] The song also served as the lead single from Williams' second studio album, Girl (2014).

"Happy" is an uptempo soul and neo soul song on which Williams's falsetto voice has been compared to Curtis Mayfield by critics. The song has been highly successful, peaking at No. 1 in the United States, United Kingdom, Canada, Ireland, New Zealand, and 19 other countries. It was the best-selling song of 2014 in the United States with 6.45 million copies sold for the year,[3] as well as in the United Kingdom with 1.5 million copies sold for the year.[4] It reached No. 1 in the UK on a record-setting three separate occasions and became the most downloaded song of all time in the UK in September 2014;[5] it is the eighth highest-selling single of all time in the country.[6] It was nominated for an Academy Award for Best Original Song. A live rendition of the song won the Grammy Award for Best Pop Solo Performance at the 57th Annual Grammy Awards.

The music video for "Happy" was nominated for Best Male Video and Video of the Year at the 2014 MTV Video Music Awards. It also won the Grammy Award for Best Music Video at the 57th Annual Grammy Awards.[7][8] The song was Billboard's number-one single for 2014.

"Happy" was the most successful song of 2014, with 13.9 million units (sales plus equivalent streams) worldwide

7 0
3 years ago
What is a symptom of a failing power supply? The display has only a blinking cursor. The computer displays a POST error code. Th
Mariulka [41]

Answer:

A sympton of a failing power supply is The computer sometimes does not turn on.

Explanation:

All right, the power supply is the terminal that receives electric current to process it and distribute it to the different parts of the hardware that compose the computer. When it fails, the current is not distributed and doesn't reach the different pieces of hardware. Therefore, option D) is the correct one. Another error that could be related is the malfunction of fans but it could be related to wires more than the power itself.

7 0
3 years ago
Justine was interested in learning how to play the piano. Before she was allowed to even play the piano, she has had to learn
Setler [38]

Answer:

A

Explanation:

The answer is A because, to be novice at something that means one is new to and is inexperienced at said activity.

3 0
3 years ago
Read 2 more answers
A buffer storage that improve computer performance by reducing access time is​
kvasek [131]
Cache memory

Hope it helps
4 0
3 years ago
What is the main difference between a literacy society and a digital Society
EleoNora [17]
The accurate answer is

The difference is a Literacy Society is a program for encouraging people to read.
A Digital Society is a program that as to do with technology at work,school, or at home.

Glad to help :) 
7 0
3 years ago
Other questions:
  • Determine the number of bytes necessary to store an uncompressed binary image of size 4000 × 3000 pixels.
    9·1 answer
  • Write a function decimalToBinaryRecursive that converts a decimal value to binary using recursion. This function takes a single
    11·1 answer
  • What happens as the key length increases in an encryption application?
    8·1 answer
  • Lenovo's ThinkPad laptop computers is designed in the United States, the case, keyboard, and hard drive are made in Thailand; th
    14·1 answer
  • Write a Java program to count the characters in each word in a given sentence?Examples:Input : geeks for geeksOutput :geeks->
    10·1 answer
  • Once secured a wheelchair may move up to 6 inches in any direction
    6·1 answer
  • What are 3 ways to select an entire document?
    15·1 answer
  • For the recursive method below, list the base case and the recursive statement, then show your work for solving a call to the re
    8·1 answer
  • Discuss TWO changes in ICMP that took place with the development of IPV6 and indicate why those changes were made.
    7·1 answer
  • What is the process of smaw welding​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!