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
Differevce between arrays and array builders?
ok how would i do the following extract from a file i have ssns = 267907230 which are in column 7 into a separate data set then create a 2nd job step to extract from the data set created the following "fund code" which is in column 31 and is 113 into yet another data set
what is woransient key word? how it is used in java
how pseudo column works?
what is the difference between uservariables and systemvariables (in Environmental variables)???
what is throws keyword
when we use mantis? how learn mantis?
Code for display the images from drive using vb 6.0?
Write a shell program where you enter a number which corresponds to K.M. Find out the corresponding values in m, cm, inches, and feet. Hints:- 1 k.m= 1000 m 1 m= 100 cm 1 inches= 2.54 cm. 1 feet= 12 inches
hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
In project we have Documentation phase also,in that what is micro and macro designing?
what are the missinschema properties and should we pass primary key in select command
how to remove header and footer in jcl using sort utility
what is dot net framework