links - SysPCA
- slides and recordings on Moodle
- book with relevant content: Computer Systems; A Programmer's Perspective.pdf
- exercises on CodeExpert
- exercises on Moodle
- results on http://spca.ethz.ch/
- Assembly cheatsheet: [[x86-64_reference_cheatsheet.pdf]]
Info
- course:
- CS 15-213 (Carnegie Mellon Univesity) -> Basis von script
- CSE333 (University of Washington) -> C programming slides
- emails: troscoe@inf.ethz.ch, aklimovic@ethz.ch
- exam:
- online exam on codeExpert
- no test suite for exam questions
- last submitted version counts
-
exercises
- practice classes
Hilfsmittel SystemProgramming&ComputerArchitecture
none
Exercises
Vorlesung
#timestamp 20250916
#timestamp 20250917
C-Workflow

// conditionals
if(statement) else
switch(integrer) {
case const_1: sth; break;
case const_2: sth; break;
default; break;
}
// functions
return;
// loops
for(initial; test; increment) statement
while(bool_expression) statement
do statement while (bool_expression)
// jumps
break
continue
goto label
// I/O (not part of C)
printf()
// basic types
// - declatations
// - scopes and static
int
float
bool // (just int)
void
const
enum
intis always 4bytes/32bitsfloatis always 4bytes/32bitsdoubleis always 8bytes/64bits
-> all other types are different based on the implementation

- early termination for
||and&&, like in CPP
#timestamp 2025-09-23
- C compiler does not check the array bounds
- multidimensional array:
int mat[3][3] - string := array of char's terminatd with null byte
#timestamp 2025-10-01
int *p; // p is a pointer to int
int *p[13]; // p is an array[13] of pointers to int
int *(p[13]); // p is an array[13] of pointers to int
int **p; // p is a pointer to a pointer to an int
int (*p)[13]; // p is a pointer to an array[13] of int
int *f(); // f is a function returning a pointer to int
int (*f)(); // f is a pointer to a function returning int
int (*(*f())[13])(); // f is a function returning a pointer to an array[13] of pointers to functions returning int
int (*(*x[3])())[5]; // x is an array[3] of pointers to functions returning pointers to array[5] of ints
#timestamp 2025-10-12
Always check the return value of
malloc!!#timestamp 2025-10-31
- useful for lab 5: https://web.navan.dev/posts/2023-10-04-bomb-lab.html
- my solution: 20251031_SysPCA_bomb_lab