Is there a C library for machine learning algorithms?
Here's a detailed table about different machine learning libraries on different languages:

https://github.com/josephmisiti/awesome-machine-learning

Checkout C version here and C++ version here.

Personally speaking, try OpenCV ! OpenCV provides multiple machine learning implementations including KMeans, kNN, SVM, etc.