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

How are variables declared in c?

601


What does printf does?

753


please send me the code for multiplying sparse matrix using c

1729


Differentiate between calloc and malloc.

762


What are the uses of null pointers?

595






Why doesnt this code work?

620


write a program fibonacci series and palindrome program in c

633


how to find anagram without using string functions using only loops in c programming

2720


How would you use the functions fseek(), freed(), fwrite() and ftell()?

708


Explain what is the difference between #include and #include 'file' ?

591


What is the use of extern in c?

651


Can variables be declared anywhere in c?

626


Which are low level languages?

640


Is c dynamically typed?

671


How can you determine the maximum value that a numeric variable can hold?

643