Shell sort in C