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...

write a program for finding the union of two integer array
in java?

Answer Posted / nadeem khokhar

the above mentioned code is also good one. but i m giving you an algorithm you can say, so you can get the concept and convert it into any language
int a[3]=1,2,3;
int b[3]=2,3,4;

for(int i=0; i <=2; i++)
{

for(int j=0; j<=2; j++)
{

if(a[i] == b[j])
cout<<a[i]; is a union of a and b
}
}

Is This Answer Correct ?    14 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference of Console, web & windows applications?

2136


public static void main(String args[]) describe it

2042


why we need to take u?

2072


I need to fetch all rows from the table based one field value in the table and later do a condition check if the condition is true I will have to move all the rows present in the data base to output file one else if the condition is not satisfied then move all the records of that field value into another file .Please let me know how to do that

2087


What is the entry point function of a DLL?

996


what will we require to build project with the help of oracle

1785


How to get the index of the clicked field in reports in ABAP?

1635


Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)

1125


write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.

1544


What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe

1924


how do i create my own exception class which will restrict IO exception?

2695


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

2072


I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...

2994


what is session state?

1902


hai i am prasanna.I am MCA 2009 fresher.tell me about certifications.which certification helps me to improve my carrier and to get a technically oriented job ,which certification helps to get job faster.

2364