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 pointers in c?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
How many parameters should a function have?
Why pointers are used?
What is difference between array and pointer in c?
What are global variables and explain how do you declare them?
Write a program of advanced Fibonacci series.
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is a class c rental property?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is binary tree in c?
What's the difference between constant char *p and char * constant p?
what is reason of your company position's in india no. 1.
What is openmp in c?
What is call by value in c?