Skip to content

Commit

Permalink
added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sayoojkz authored Oct 30, 2018
1 parent 13afc89 commit a7c22b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sorting/mergesort.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>

void swap (int *a,int *b)
void swap (int *a,int *b)//To swap the variables//
{
int t;
t= *a;
Expand All @@ -9,7 +9,7 @@ void swap (int *a,int *b)

}

void merge(int a[],int l,int r,int n)
void merge(int a[],int l,int r,int n)//To merge //
{ int *b = (int*)malloc(n*sizeof(int));
int c=l;
int p1,p2;
Expand Down Expand Up @@ -64,7 +64,7 @@ void mergesort(int a[],int n,int l,int r)
}

}
int main(void) {
int main(void) { //main function//
int *a,n,i;
scanf("%d",&n);
a = (int*)malloc(n*sizeof(int));
Expand Down

0 comments on commit a7c22b5

Please sign in to comment.