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

the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

1049


What is meant by realloc()?

1143


What is difference between %d and %i in c?

1236


Write a program to find the biggest number of three numbers in c?

1045


What does the error message "DGROUP exceeds 64K" mean?

1220


What is I ++ in c programming?

1118


how can use subset in c program and give more example

1992


How can you increase the allowable number of simultaneously open files?

1160


What is double pointer in c?

1040


List a few unconditional control statement in c.

985


What is the difference between #include

and #include “header file”?

1031


What are multibyte characters?

1119


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1251


What is the value of c?

1063


Explain what is the benefit of using #define to declare a constant?

1181