Tag Archives for C
Learn C the hard way!
Zed A. Shaw den man vielleicht von “Learn python the hard way” kennt sitzt gerade an einem neuen Buch: “Learn C the hard way“. Und falls man es noch nicht kennt: Teach Yourself Programming in Ten Years (must read!)
Signalhandler
Mal 3 Zeilen um Signale zu verarbeiten. Wichtig ist hierbei das SIGKILL nicht blockierbar ist (SIGTERM übrigens auch nicht ;-) ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include <stdio.h> … Continue reading
C Variablen tauschen
Der Klassikertrick. Durch XOR Verknüpfungen eine Variable sparen. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include <stdio.h> int main (int argc, char const *argv[]) { int a = 1; int … Continue reading
C
1 2 3 4 5 6 #include <stdio.h> int main (void) { printf("Ich bin jetzt offiziell C-Tutorn"); return 0; }