Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

c# code for how to merge two sorted arrays
Input : A = 2,5,8,4
B = 3,9,10,5
Output : 2,3,4,5,5,8,9,10

Answer Posted / m.shanmuga sundaram, rjnsoftwa

int[] A = {2,5,8,4};
int[] B = { 3, 9, 10, 5 };
int[] C = new int[A.Length + B.Length];

A.CopyTo(C, 0);
B.CopyTo(C, A.Length);

Array.Sort(C);

foreach (int num in C)
{
Console.WriteLine(num);
}

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# code is unmanaged or managed code?

1168


Why extension method is static?

968


What is the difference between internal and private in c#?

984


Why is it efficient to use System.string under System.Text.StringBuilder ?

1028


What is the difference between virtual method and abstract method?

1034


Explain what a diffgram, and a good use for one Define diffgram? How it be used?

1054


Explain clr in brief.

1014


What is indexer c#?

930


What is poco c#?

961


Explain the difference between class and interface in .net?

911


What are fields in c#?

943


What is deferred execution?

935


What is the usage of transponders?

1004


How is exception handling implemented in c#?

1092


Can enum be null c#?

1099