Version without JavaScript, read-only: workshops, quizzes and running code are not available here. Full version · Catalogue · Sign in

Exercise sheet 2

Pointers and arrays

Follow pointers by hand, predict sizeof values, find classic bugs, then write code with addresses - minmax, strings, matrices. Chapter 2.

Unless stated otherwise, we assume a 64-bit PC running Linux: an int is 4 bytes, a pointer 8. Programs are compiled with gcc -std=c11 -Wall -Wextra -Werror.