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 / sumanth

firt do sum of n elements in first array a i.e., n(n+1)/2
next the sum of n-1 elements in second array b i.e., n(n-1)/2...
from diff of these 2 sums we will get the missing element in b

Is This Answer Correct ?    30 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why c is called a mid level programming language?

1112


The difference between printf and fprintf is ?

1346


What is bubble sort technique in c?

1039


Define recursion in c.

1350


Why are algorithms important in c program?

1174


write a c program to calculate sum of digits till it reduces to a single digit using recursion

3381


What is variable and explain rules to declare variable in c?

1178


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1410


What are called c variables?

1127


What are header files and what are its uses in C programming?

1337


Explain about the constants which help in debugging?

1420


What is pointer & why it is used?

1172


What are control structures? What are the different types?

1145


why we wont use '&' sing in aceesing the string using scanf

2427


Why is this loop always executing once?

1110