I have a question about exact sequences. If I have a sequence of the form $$0 \rightarrow A \xrightarrow{f}B \xrightarrow{g}C \rightarrow 0 $$ I know that for the sequence to be exact, we need that $Im(f) = Ker(g)$. However, do we need that $f$ be injective and $g$ be surjective? Or not?
Also, for the sequence $$ A \xrightarrow{f'} B \xrightarrow{g'}C $$ to be exact, besides having $Im(f') = Ker(g')$, do we need $f'$ to be injective or $g'$ to be surjective?
For the first sequence, the answer is ‘yes’, because a $5$-term exact sequence is exact if and only if the $3$-term exact sequences:
are exact. This translates exactly as you mention.
Obviously, the answer is ‘no’ for the second exact sequence.