5 ms·
scanf(“%s”, …) can cause a buffer overflow.
scanf(“%s”, …) can cause a buffer overflow.
It sucks that there's no scanf("%.*s"), where you give the buffer length as a separate argument. The fact that it's in a string literal also makes using a compile-time constant really ugly.
You can overflow buffers all sorts of ways in C.