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

Difference between debug.write and trace.write?

943


What does it mean to override a method?

954


How do you pronounce c#?

871


What is dll hell, and how does .net solve it?

947


What are some examples of desktop applications?

915


Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?

973


Which is the base class in c#?

905


What is a sealed class?

914


What are actions in c#?

861


What is asenumerable in c#?

869


if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.

2387


What is c# used for?

1018


List down the differences between public, static and void keywords?

858


What is stringreader in c#?

857


Are all methods virtual in c#?

932