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
What is nested structure in c?
Tell me what is null pointer in c?
Explain how do you generate random numbers in c?
Why isnt any of this standardized in c?
Tell us the use of fflush() function in c language?
Describe the order of precedence with regards to operators in C.
Give basis knowledge of web designing ...
Explain About fork()?
What is pointer to pointer in c with example?
Why array is used in c?
What do you mean by a sequential access file?
What is pragma in c?
Why main function is special give two reasons?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
What is sizeof in c?