Fri Aug 10, 2012 7:46 am
#include<stdio.h>
#include<conio.h>
void read(int *,int);
void dis(int *,int);
void sort(int *,int);
void merge(int *,int *,int *,int);
void main()
{
clrscr();
int a[5],b[5],c[10];
printf("Enter the elements of first list \n");
read(a,5); /*read the list*/
printf("The elements of first list are \n");
dis(a,5); /*Display the first list*/
printf("Enter the elements of second list \n");
read(b,5); /*read the list*/
printf("The elements of second list are \n");
dis(b,5); /*Display the second list*/
sort(a,5);
printf("The sorted list a is:\n");
dis(a,5);
sort(b,5);
printf("The sorted list b is:\n");
dis(b,5);
merge(a,b,c,5);
printf("The elements of merged list are \n");
dis(c,10); /*Display the merged list*/
getch();
}
void read(int c[],int i)
{
//Code to read user input
}
void dis(int d[],int i)
{
//Code to print content of the array
}
void sort(int arr[] ,int k)
{
//Code to Sort the Array
}
void merge(int a[],int b[],int c[],int k)
{
//Code to merge 2 arrays
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.