I am using Ubuntu and I want to read the version of its kernel. I found a file named version in /proc/ that records the version of the current kernel.
If I dont want
This should do:
system("uname -r");
EDIT: type man uname in a terminal to get the list of options you can use with uname
man uname
uname