KMeans for C