What is the shortest C program with a segmentation fault that you can write?

Create a file named main.c and compile it using gcc -nostdlib main.c.

int _start() {}

Execute the output binary to get a segmentation fault.

[1]    15054 segmentation fault  ./a.out

Congratulations! Now consider learning Rust.