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

if array a conatins 'n' elements and array b conatins 'n-1'
elements.array b has all element which are present in array
a but one element is missing in array b. find that
element.

Answer Posted / reshma

class My
{

public static void main(String[] args) {

int a1[] = {7,6,3,1,4};
int a2[] = {4,3,7,6};

int sum1= 0;
int sum2 = 0;
for(int i=0 ;i<a1.length;i++)
{
sum1 = sum1 + a1[i];
}

for(int j=0;j<a2.length;j++)
{
sum2 = sum2 + a2[j];

}
System.out.println("MISSED NO IS: "+(sum1 - sum2));
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

number of times a digit is present in a number

2043


What are operators in c?

1034


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1128


what do the 'c' and 'v' in argc and argv stand for?

1176


State two uses of pointers in C?

1070


Why do we need a structure?

1054


What are the different categories of functions in c?

1139


Is c++ based on c?

1083


How to draw the flowchart for structure programs?

9348


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1142


Which is the best website to learn c programming?

1087


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1079


What the advantages of using Unions?

1236


Does * p ++ increment p or what it points to?

1130


Write a program to print "hello world" without using a semicolon?

1071