Functions implemented in C