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 / reshma
class My
{
public static void main(String[] args) {
int a1[] = {7,6,3,1,4};
int a2[] = {4,3,7,6};
int sum1= 0;
int sum2 = 0;
for(int i=0 ;i<a1.length;i++)
{
sum1 = sum1 + a1[i];
}
for(int j=0;j<a2.length;j++)
{
sum2 = sum2 + a2[j];
}
System.out.println("MISSED NO IS: "+(sum1 - sum2));
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
number of times a digit is present in a number
What are operators in c?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
what do the 'c' and 'v' in argc and argv stand for?
State two uses of pointers in C?
Why do we need a structure?
What are the different categories of functions in c?
Is c++ based on c?
How to draw the flowchart for structure programs?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Which is the best website to learn c programming?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
What the advantages of using Unions?
Does * p ++ increment p or what it points to?
Write a program to print "hello world" without using a semicolon?