I tried avoiding nested loops and usage of too many variables. This is up for review and comments.
void bubble_Sort(int *arr, int n)
{
int i = 0;
int* temp = arr;
while(n > 1)
{
if(i == (n-1))
{
i=0;
n--;
temp = arr;
}
if(*temp > *(temp+1))
{
*temp ^= *(temp+1);
*(temp+1) ^= *temp;
*temp ^= *(temp+1);
}
temp++;
i++;
}
}