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
zepelin [54]
3 years ago
11

What is the output of the following program when the method is called with 4?

Computers and Technology
1 answer:
wolverine [178]3 years ago
8 0

Answer:

C. ?????

Explanation:

Given code:

void unknown(int n)

{

if(n>0)

unkown(n-1);

System.out.print("?");  

}

Calling code: unknown(4)

This is a recursive invocation of unknown function and causes ? to be printed 5 times once each for following values of n.

  • unknown invocation with n=4
  • unknown invocation with n=3
  • unknown invocation with n=2
  • unknown invocation with n=1
  • unknown invocation with n=0

When n becomes 0, termination condition is reached and the function returns.

So the output is ?????

You might be interested in
Cho một File Input.TXT chứa dãy nhị phân liên tiếp của một văn bản đã mã
Verizon [17]

Answer:

hyfchoofdcgvjoo

Jajosoxjkq

4 0
3 years ago
Read 2 more answers
I need a quick way to see all hardware connected to my computer.
timofeeve [1]
Look it up..............
7 0
3 years ago
Who know's web Design
balu736 [363]

Answer: B

Explanation:

inline is the answer

4 0
3 years ago
Which one???????????????
uranmaximum [27]
I think it’s A, but sorry if I’m wrong it just looks like the one. :) Also this is my first time answering a question!
3 0
3 years ago
Read 2 more answers
____ variables are variables that are shared by every instantiation of a class. local instance
Colt1911 [192]

These are known as class variables, so called because of the property mentioned.

4 0
3 years ago
Other questions:
  • Your revenue is $22,000. Your Cost of Goods is 16,250. Your gross profit is _____________, fill in the blank,.
    14·1 answer
  • Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow
    8·1 answer
  • A(n) __________ can include a computer's full operating system, applications, and system settings, including security and config
    7·1 answer
  • The file manager used in Microsoft Windows is
    11·1 answer
  • I just downloaded an update for my laptop. Now, it doesn't give me a notification when the battery is low, and it just shuts off
    6·1 answer
  • This is really not a question but yall should texts me I need friends:))
    9·2 answers
  • Write a program in which you input three numbers they canhave decimals so float values and the program gives you the minvalue ou
    8·1 answer
  • Which XXX will prompt the user to enter a value greater than 10, until a value that is greater than 10 is actually input?
    14·1 answer
  • What does the computer receive when you press a key on a laptop keyboard?
    8·1 answer
  • 3. In 1989, the first handheld console was released by _____ and it was called ________.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!