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
Why c is called a mid level programming language?
The difference between printf and fprintf is ?
What is bubble sort technique in c?
Define recursion in c.
Why are algorithms important in c program?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What is variable and explain rules to declare variable in c?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
What are called c variables?
What are header files and what are its uses in C programming?
Explain about the constants which help in debugging?
What is pointer & why it is used?
What are control structures? What are the different types?
why we wont use '&' sing in aceesing the string using scanf
Why is this loop always executing once?