C++ (Qt)while(!asleep()) sheep++;
#include <QApplication>#include <QLabel>#include <QDialog>#include <sys/utsname.h>int main(int argc, char *argv[]){ QApplication a(argc, argv); QDialog *w = new QDialog; QLabel *label = new QLabel(w); struct utsname buf; label->setText((buf.sysname)); w->show(); return a.exec();}
#include <sys/utsname.h>#include <stdio.h>#include <errno.h> int main(){ struct utsname buf; if (uname(&buf) == 0) { printf("OS name: %s\n", buf.sysname); printf("OS version: %s\n", buf.version); printf("OS release: %s\n", buf.release); printf("Arch: %s\n", buf.machine); } else { perror("Error"); } return 0;}