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
8090 [49]
3 years ago
11

Write a function merge that merges two lists into one, alternating elements from each list until the end of one of the lists has

been reached, then appending the remaining elements of the other list.
Computers and Technology
1 answer:
Anna007 [38]3 years ago
5 0

Explanation:

The program that merges two lists or two arrays is written below;

Code :

void main void

{

char [] arr1= {'1','2','3'};

char [] arr2= {'a','b','c','d','e'};

int l1= arr1.length;

int l2=arr2.length;

int l3=l1+l2;

char [] arr3=new char[l1+l2];

int i=0;

int j=0;

int k=0;

int m=0;

int r=0;

if(l1<l2)

   r=l1;

else

   r=l2;

while(m<r)

{

   arr3[k++]=arr1[i++];

   arr3[k++]=arr2[j++];

   m++;

}

while(k<l3)

{

   if(l1<l2)

       arr3[k++]=arr2[j++];

   else

       arr3[k++]=arr1[i++];

}

for(int n=0;n<l3;n++)

{

   System.out.print(arr3[n]+" ");

}

}

You might be interested in
_____ provide a description of the data characteristics and the set of relationships that link the data found within the databas
Karolina [17]

Answer:

The correct answer to the following question will be "Metadata".

Explanation:

Metadata is "information providing information on other data" This is "data about data", in other words.

There are many subareas of metadata, including:

  • Structural metadata
  • Iscriptive metadata
  • Statistical metadata
  • Reference metadata
  • Administrative metadata

Metadata gives a summary of the features of the data and the collection of relationships that connect the data found in the database.

It defines other details, is a prefix in most uses of computing means "an underlying meaning or description. Very simple document metadata are, for example, creator, date generated and date changed and file size.

Therefore, Metadata is the right answer.

6 0
3 years ago
Jump to Question: Fill in the blanks below: The flow of electricty is similar to the movement of water through a pipe. The movem
HACTEHA [7]

The answer is;

Current  

Voltage  

Power/Wattage  

Circuit

Water moving through pipes is like electricity flowing in a circuit. The flow of electricity is an actual flow of electrons. That movement of electrons is what is known as current. Think of current as the volume of water flowing through a water pipe. The electrons need some force or pressure to move, and so is water in a pipe. The voltage is that electromotive force; the pressure that pushes the electrons in a system. The power measured in Watts is the rate at which the energy is consumed. For the current to flow the circuit must be complete. Otherwise we cannot say that we have power if the circuit is not closed.

5 0
3 years ago
How many binary digits does a single hexadecimal digit represent?
Lera25 [3.4K]

Four binary digits

A single hexadecimal digit can represent four binary digits.

5 0
3 years ago
Im bored anyone up for a convo? lets talk.. =D
aleksandrvk [35]

Answer:

ok im fine with dat <3

6 0
3 years ago
Read 2 more answers
What are the advantages of AI?????
mr Goodwill [35]
AI is a technology that can do thing that humans are doing. So in future humans don’t have to these AI will do it for us.
4 0
3 years ago
Other questions:
  • If you interview a dentist to learn about her experiences on the job, she is considered a secondary source of information. Pleas
    7·2 answers
  • It is always better to run over and give more information when you are giving a presentation versus quitting on time.
    11·2 answers
  • How often does colleges update the cost of attendance on their website?.
    13·1 answer
  • Write the definition of a function named averager that receives a double parameter and returns-- as a double -- the average valu
    11·1 answer
  • Giải thích mục đích của các thao tác open() và close().
    6·2 answers
  • Write a program that takes paragraph from the user and prints all unique words in that paragraph using strings in c++
    5·1 answer
  • Face book suggests Friends for users based on their
    13·1 answer
  • Python - Write a program to print the multiplication table as shown in the image by using for loops.
    12·1 answer
  • Different he launc.<br>in function are available with MS-Excel<br>Many​
    14·1 answer
  • Which is an example of a demand account
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!