Hi, I was learning 'Selection Sorting' in C and while writing my program I constantly get the error-
[Error] expected expression before '{' token
Here's my program-
#include<stdio.h>
void main(int A[10])
{
int i,j;
A[10]={2,4,1,9,0,6,5,7,3,8};
for(i=0;i<9;++i)
{
int Min=i;
for(j=i+1;j<10;++j)
{
if(A[j]<Min)
{
Min=j;
}
int temp=A[i];
A[i]=A[Min];
A[Min]=temp;
}
}
for(i=0;i<10;++i)
{
printf("%d\n",A[i]);
}
}
If I try to initialize A[10] as a parameter in the function, it gives this error-
[Error] expected ';', ',' or ')' before '=' token
What's the issue?