Q. Write down an algorithm to merge the two sorted arrays into the third array. Do not perform the sort function in the third array.
Ans:
void merge(int *a,int *b,int n,int m)
{
int i=0,c[20],j=0,k=0,count=0;
while(i<=n&&j<=m)
if(a[i]
c[k]=a[i];
i++;
k++;
}
if(a[i]>b[j])
c[k]=b[j];
j++;
if(a[i]==b[j])
k++; i++; j++;
count++;
if(i<=n&&j==m)
while(i<=n)
if(i==n&&j<=m)
while(j<=m)
for(i=0;i
printf("%d\t",c[i]);