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
Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.
When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.
What is the use of sas software? Is sas and sap are different?
I am work in it aompenei
What are the Short cut Keys of Tally ERP?
what is difference between kpo and it industry? that is in terms of work, package etc
Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik
1. How many jobs can we write in a single file? 2. How many maximum members can exist in a single partition data set(pds) in jcl?
It is possible to take number of controls added to form at run-time.ex-when user enter 6, 6 text boxes get added to form,next time number of controls get change as per user number enter. What is code for that?
differences between qtp10.0 and 11.0 ?
Explain with examples any 2 features of OOPS.
What are events in smartforms?
how can i split string in a textbox in windows appication using C#.net
how do i add a column dynamically in a table by using java application?
What is the difference between WebIntelligence and Designer in creating universes?