Our tutor gave us some contour integrals to write in closed form (not homework, just exercise), which we never discussed. I still wonder about the following:
$$ \oint_C \frac{dz}{f(z) - a} $$
Is there a closed form for this integral (something general only depending on $f$ and $a$ and $C$)?
The reason I ask is because I think there is a mistake in the question (at least in what I wrote) and that there might be no simple form. I think what the question should be is
$$ \oint_C \frac{f'(z) dz}{f(z) - a} $$
for which I think I know the result ($g(z) = f(z) - a$ and then the argument principle).
Suppose that $z_1, \dots, z_n$ are the points in the interior of the contour such that $f(z_i) = a$. (I'll assume that $f(z)$ is never equal to $a$ on the contour itself. Since the zeroes of non-constant holomorphic functions are isolated, and since the contour plus its interior is compact, there are only finitely many such $z_i$'s, by Bolzano-Weierstrass.)
I'm going to assume that $f(z) - a$ has simple zeroes at $z_1, \dots, z_n$. (I'm sure there is a generalisation to the case where some of the zeroes are of higher multiplicity, but I haven't thought this through.)
Notice that Taylor expansion of $f(z)$ around $z = z_i$ takes the form, $$ f(z) = a + f'(z_i) (z - z_i) + \dots $$ Therefore, the residue of the meromorphic function $1/(f(z) - a)$ at $z_i$ is $$ {\rm Res}_{z = z_i} \frac 1 {f(z) - a} = \frac 1 {f'(z_i)}.$$
Hence, by the residue theorem, $$ \oint_C \frac{dz}{f(z) - a} = 2\pi i \sum_{i} \frac 1 {f'(z_i)}.$$