#include<stdio.h>
#include<stdlib.h>
int main ()
{
int *array[] = { 10, 7, 15, 25, 11, 37, 12, 44, 30, 14};
int n =10;
sort (array,10);
}
int sort(int *a, int x)
{int temp=0,i, j;
for( i=0; i<x;i++)
{
for ( j= 0 ; j<x-1;j++)
{
if(*(a+j)>*(a+j+1))
{
temp=*(a+j+1);
*(a+j)=*(a+j+1);
*(a+j+1)=temp;
printf("%d\n",a[j]);
}
}
}
}
My output shows all 0's ? can some one enlighten me on this ? :s

New Topic/Question
Reply




MultiQuote





|