C Program to get the system information.

C Program to get the system information. We can use the ‘uname’ function to get the system information, which is defined in the “sys/utsname.h” library.Structure is used to hold information returned by the uname function.
“uname” function members and their use:
sysname returns the name of the operating system in use.
release returns the current release level of the operating system implementation.
version returns the current version level within the release of the operating system.
machine is the description of the type of hardware that is in use.
Read more about C Programming Language.

* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
* Happy Coding

#include<sys/utsname.h> /* Header for 'uname' */

struct utsname uname_pointer;


printf("System name - %s n", uname_pointer.sysname);
printf("Nodename - %s n", uname_pointer.nodename);
printf("Release - %s n", uname_pointer.release);
printf("Version - %s n", uname_pointer.version);
printf("Machine - %s n", uname_pointer.machine);
printf("Domain name - %s n", uname_pointer.domainname);

Read more Similar C Programs
Learn C Programming

Number System

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

To browse more C Programs visit this link
(c) www.c-program-example.com

One comment on “C Program to get the system information.

Leave a Reply