Let $X$ be an infinite dimensional Banach space. I know that every compact operator $A$ is not bijective or $0\in\sigma(A)$.
Fox example the compact operator $A$ defined on $X=C([0,1],\mathbb{R})$ (equipped with the supremum norm) for each $x\in X$ by $$(Ax)(t)=\int_0 ^t x(s)ds, \ \ \ \forall t\in \mathbb{R}.$$ This operator is injective and non surjective. Can we find an example of a compact operator which is not injective but surjective ?
Let $X,Y$ be a infinite-dimensional Banach space.
Then compact operators from $X$ to $Y$ cannot be surjective: This would imply that their range is closed. Then the canonical injection $$ \hat A: X/kern(A) \to R(A) $$ would be continuously invertible and compact - a contradiction.