Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / vadivel t

#include<stdio.h>
#include<math.h>
void main()
{
int a1[5] = {2,5,3,1,4}, a2[4] = {1,2,4,5};
int i, n = 5, sum1= 0, sum2 = 0;
for(i = 0; i <= n-1; i++)
{
sum1 = sum1 + a1[i];
if(i <= n-2)
{
sum2 = sum2 + a2[i];
}
}
printf("MISSED NO IS: %d",(sum1 - sum2));
_getch();
}

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is character constants?

1131


Explain high-order and low-order bytes.

1049


Explain how do you determine the length of a string value that was stored in a variable?

1094


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15729


What is ## preprocessor operator in c?

1025


When is the “void” keyword used in a function?

1429


Explain two-dimensional array.

1011


What are the __date__ and __time__ preprocessor commands?

1040


What is double pointer?

950


What is difference between structure and union in c?

925


What are shell structures used for?

984


How many types of operator or there in c?

1023


praagnovation

2222


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1018


How many bytes are occupied by near, far and huge pointers (dos)?

1116