$10\times10$ matrix $\mathbf A$ satisfies $\mathbf A^5=\mathbf0$. Find all posibilities of $\operatorname r(\mathbf A)$.
By Sylvester inequality, $\operatorname r(\mathbf A^2)\ge2\operatorname r(\mathbf A)-10$, then $\operatorname r(\mathbf A^3)\ge3\operatorname r(\mathbf A)-20$ and so on. We then have $$0=\operatorname r(\mathbf A^5)\ge5\operatorname r(\mathbf A)-40\implies\operatorname r(\mathbf A)\le8.$$ However I only have the construction for $\operatorname r(\mathbf A)\le5$: $\operatorname{diag}\{0\dots,0,\underbrace{1\dots,1}_{\le5}\}$.
What about $6$, $7$, $8$?
I assume that $r(A)$ denotes the rank of $A$ and that we are given that $A^4 \neq 0$.
Your proof that $r(A) \leq 8$ is correct. Here's an outline for a proof that we must have $r(A) \geq 4$:
Here are examples where the rank attains all possible values $4,5,6,7,8$. Denote $$ A_k = \pmatrix{M & 0\\0&M^k}, $$ where $$ M = \pmatrix{0&1&0&0&0\\0&0&1&0&0\\0&0&0&1&0\\0&0&0&0&1\\0&0&0&0&0}. $$ Verify that for $k = 1,\dots,5$, we have $A_k^4 \neq 0$, $A_k^5 = 0$, and $r(A_k) = 9 - k$.