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

What does char * * argv mean in c?

623


What is indirection in c?

622


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1505


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

716


Why is c fast?

601






how many errors in c explain deply

1629


What is c system32 taskhostw exe?

585


Explain what’s a signal? Explain what do I use signals for?

608


How to explain the final year project as a fresher please answer with sample project

465


What is the difference between the local variable and global variable in c?

529


What does d mean?

581


what is the difference between 123 and 0123 in c?

719


What does the file stdio.h contain?

599


What is a pointer value and address in c?

632


Should a function contain a return statement if it does not return a value?

596