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
What is structure data type in c?
What are the different categories of functions in c?
How does struct work in c?
What is a keyword?
write a proram to reverse the string using switch case?
Explain data types & how many data types supported by c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Can you add pointers together? Why would you?
List a few unconditional control statement in c.
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
What is c programming structure?
How do you use a pointer to a function?
What is memory leak in c?
What is the difference between new and malloc functions?
What does struct node * mean?