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 do you understand by friend-functions? How are they used?
How is pointer initialized in c?
What is the process to generate random numbers in c programming language?
What is a newline escape sequence?
What is a structure in c language. how to initialise a structure in c?
Explain about C function prototype?
What are all different types of pointers in c?
Write a program for finding factorial of a number.
Can I initialize unions?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
How can a program be made to print the name of a source file where an error occurs?
Why are all header files not declared in every c program?
What is the importance of c in your views?
what is recursion in C
How do you redirect a standard stream?