I printed test outputs to make sure it was going into the program
Code:
#include<stdio.h>
#include<stdlib.h>
RadixSort(int aList[]){
// int temp[16];
int temp[5];
int i,j;
int index=0;
printf("Test1\n");
for(i=0;i<=5;i++){
for(j=0;j<=9;j++){
if((aList[i]%10) == j){
temp[index] = aList[i];
index++;
}
}
}
PrintArray(temp);
}
PrintArray(int temp[]){
int i;
for(i=0;i<=5;i++)
printf("%d\n",temp[i]);
}
int main(){
//int aList[16] = {265,69,89,132,240,77,2,189,232,420,777,823,927,352,845,201};
printf("Test0\n");
int aList[5] = {777, 420, 281, 123, 999};
RadixSort(aList);
return 0;}
Here is my output:
MyKoL@MyKoL-PC ~
$ gcc RadixSort.c -o RadixSort
MyKoL@MyKoL-PC ~
$ ./RadixSort
MyKoL@MyKoL-PC ~
$