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

How can I invoke another program or command and trap its output?

1106


What is the difference between fread buffer() and fwrite buffer()?

1191


Explain the use of keyword 'register' with respect to variables.

1063


How can I read/write structures from/to data files?

979


what do you mean by enumeration constant?

1018


What is c system32 taskhostw exe?

1034


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2033


What the advantages of using Unions?

1236


Explain setjmp()?

1079


How can I automatically locate a programs configuration files in the same directory as the executable?

1181


What are conditional operators in C?

1108


Is it possible to initialize a variable at the time it was declared?

1229


Why array is used in c?

1026


Why doesnt long int work?

1052


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1081