Sort Codes
Sort Codes
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
FILE* file;
file = fopen(argv[1], "r");
int arr[50];
int i = 0;
while (fscanf(file, "%d", &arr[i]) == 1){
i++;
}
fclose(file1);
}
//bubble.c
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
// insort.c
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
//merge.c
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
while (j<n2)
{
arr[k] = RightArray[j];
j++;
k++;
}
}
//quick.c
#include "test.h"
#include <stdio.h>
#include <stdlib.h>
//test.h
#ifndef _HW_TEST_
#define _HW_TEST_
#endif
//makefile
clean:
rm -f *.o *.out
Array.txt
23 5 7 10 6 100 25