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
attashe74 [19]
3 years ago
15

Apakah ada yang bisa menjelaskan potongan source code ini?

Computers and Technology
1 answer:
GarryVolchara [31]3 years ago
6 0

This code attempts to fuse two strings together. So,

fuse("Apple", "Banana")

would return "ABpapnlaen a"

However, there are a couple of things wrong with this code:

- The for loop is incomplete (probably a copy paste error)

- It is unclear from the code if the array jawaban will overflow if kata1 and kata2 are large (it probably will)

- Biggest problem: the jawaban array is declared on the stack, which means it will be cleaned up when the function returns. So the caller of this function will reference unallocated memory! This is a huge bug!!

You might be interested in
4) Which is a more efficient way to determine the optimal number of multiplications in a matrix-chain multiplication problem: en
Assoli18 [71]

Answer:

Running RECURSIVE-MATRIX-CHAIN is asymptotically more efficient than enumerating all the ways of parenthesizing the product and computing the number of multiplications of each.

the running time complexity of enumerating all the ways of parenthesizing the product is n*P(n) while in case of RECURSIVE-MATRIX-CHAIN, all the internal nodes are run on all the internal nodes of the tree and it will also create overhead.

Explanation:

3 0
2 years ago
If you do not want the border style to carry forward each time the enter key is pressed, you need to ____.
ANEK [815]
Hello <span>Endermss2118 </span>

Answer: If you do not want the border style to carry forward each time the enter key is pressed, you need to Clear formatting


Hope This Helps
-Chris
8 0
3 years ago
Robert's computer is not starting due to an error in the BIOS. Which of these chips could have malfunctioned? Select the correct
timofeeve [1]

Hi;

In the question, Robert gives the explanation that there is an error in the BIOS. A BIOS (Standing for Basic Input & Output System) is a ROM chip, and is vital for the computer to initialize devices such as RAM, the CPU, etc. If there is ever an error there, a computer simply cannot boot.

From the options given, your answer given would be C. ROM.

I hope this helps!

8 0
3 years ago
Hello safiya77 this is for you
Ray Of Light [21]
Hello astropiggy!
Feel free to ask any question!
I’ll try my best to answer them!
5 0
2 years ago
Write a method named rotateright that accepts an array of integers as a parameter and rotates the values in the array to the rig
trasher [3.6K]
You should really state what language you are using. I have produced your method in C#, and should be easily translatable in to any other language.

static void RotateRight<T>(T[] arr)
{          
    T temp = arr[arr.Length - 1];
   
    for (int i = arr.Length - 1; i >= 0; i--)
    {               
        if (i == 0)                   
            arr[i] = temp;               
        else                   
            arr[i] = arr[i - 1];           
    }       
}
3 0
3 years ago
Other questions:
  • What are some ways to accept data typed into a cell? Check all that apply.
    15·1 answer
  • The page orientation in which the page width is greater than the page height is called
    8·1 answer
  • Aapke question about computer keyboard​
    5·1 answer
  • What are the concerns surrounding 5G cellular networks?​
    6·1 answer
  • Data is?
    15·1 answer
  • What do you consider to be the next big thing in "Small Systems" (technology, hardware, software, etc.) and why?
    10·1 answer
  • What does FTTB mean?
    13·1 answer
  • I still need help, thank you! Will give Brainliest ​
    10·1 answer
  • Do small companies need computers? why?<br>​
    12·1 answer
  • Why womt this code work????
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!