how to change file permissions in C language

C
SYNOPSIS
   #include <sys/stat.h>

   int chmod(const char *path, mode_t mode);

...
Source

Also in C: