Possible to change screen brightness with C?

Using C in Linux, would it be possible to change the brightness of the viewing screen? This isn't expected to be portable other than running on my installs of Ubuntu and Fedora. I'm asking about how I would interface with the os to change the brightness.