Total members 11890 |It is currently Sat Apr 20, 2024 10:36 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Incomplete code for array sorting and merging
Code:
#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 





Author:
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Incomplete code for array sorting and merging
 How to write a code for sorting array of 100 number in C++     -  
 quicksort algorithm implementation java code- array sorting     -  
 balloon sort algorithm C++ implementation code-sorting array     -  
 Bubble Sort Algorithm Java Implementation Code-Sorting Array     -  
 list insertion sorting code in c++     -  
 Quicksort implementation C++ Code-Integers-Sorting     -  
 Sort strings java-Sorting Array of Strings     -  
 Merging JAR files     -  
 How to write C++ code that defines array of size 24 then;     -  
 How to write do multifield sorting easily     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
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