Hi,
I don't know why it shows the error of identifier 'a'. It is a parameter only.
Any advice?
Thanks
gogo
#include <stdio.h>
int* sort(int a[], int element)
{
int i=0, j=0, temp;
while(i < (element - 1) )
{
j = i + 1;
while(j < element)
{
if a[i] > a[j]
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
j++;
}
i++;
}
}
void main()
{
int q[]={12, 99, 58, 43, 39, 82, 22, 57, 31, 53, 92};
int p;
for(p=0; p<11; p++)
printf(" %d ", q[p]);
sort(q, 11);
for(p=0; p<11; p++)
printf(" %d ", q[p]);
}