write a function that accepts an array A with n elements and
array B with n-1 elements. Find the missing one in array
B,with an optimized manner?
Answer Posted / aravind
#include<stdio.h>
int missing_item(int,int);
int main()
{
int a[10];
int b[9];
printf("enter size of array");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("enter the elemets of array a ");
scanf("%d",&a);
}
for(i=0;i<n-1;i++)
{
printf("enter b elements");
scanf("%d",&b);
missing_item(int c,int d)
{
int item;
for(i=0;i<n;i++)
{
if(c[i]==d[i])
break;
else
{
item=c[i];
printf("the missing item is=%d",c[i]);
}
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How do I copy files?
what is the diffrenet bettwen HTTP and internet protocol
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
C language questions for civil engineering
Why is c still so popular?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
Calculate 1*2*3*____*n using recursive function??
What is a macro?
What is the mean of function?
Why do we use static in c?
How many identifiers are there in c?
What is the difference between array and pointer?
How to Throw some light on the splay trees?
What are variables c?