Hey!!!I have a question!!!!Why at the following code,which is an implematation of the bubble sort :
#include <stdio.h>
int main()
{
int a[10]={34,2,56,78,34,5,76,10,47,29};
int n=10;
int i,j,temp;
for(i=0;i<10;i++)
{
for(j=0;j<n-i;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
we use this command for(i=0;i<10;i++) and not this for(i=0;i<=10;i++)???