finding examples for a non negative and continuous function for which the infinite integral is finite but the limit at infinity doesn't exist
For (b), and therefore (a), let $f(x)=0$ with the following exceptions. For every positive integer $n$, $f(x)$ climbs linearly from $f(x)=0$ at $x=n-2^{-2n}$ to $f(x)=2^n$ at $x=n$, then falls linearly to $0$ at $x=n+2^{-2n}$.
The area of the triangle "at" $n$ is $(2^{-2n})(2^n)$, that is, $2^{-n}$, and the sum of the areas of these triangles is $1$.