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 can I avoid the abort, retry, fail messages?
What is the best way of making my program efficient?
What is a structural principle?
How are structure passing and returning implemented?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
what are bit fields? What is the use of bit fields in a structure declaration?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What is an lvalue?
What is the purpose of scanf() and printf() functions?
Is that possible to store 32768 in an int data type variable?
Why do we use pointer to pointer in c?
What are the advantages and disadvantages of a heap?
Tell me can the size of an array be declared at runtime?
What is the difference between int main and void main in c?
What are reserved words with a programming language?