Hello World!

01/12/2023

What a lovely day, imagine about the worst way to sort a segmented allocation like this:

#define swp(a, b) a=a^b;b=a^b;a=a^b;
void bsort(int *arr) {
  int size = sizeof(*arr) / sizeof(arr[0]), x, y;
  for(x=0; x<size; x++)
    for(y=0; y<size; y++)
      if(arr[x] > arr[y])
        swp(arr[x], arr[y]);
}

Just to convince you to know I have a plenty knowledge about this language, doesn’t mean this piece of code could ever working in real life (are swapping pointers legit?).

If it works, it works

But how

Try this at home

One last thing

shiggy