Whether the set $A$ , $ A=\{y\in R : y= \lim_{n\rightarrow \infty} f(x_{n}) \text{ where } x_n \text{ diverges to } +\infty \}$ is connected Let  $f: \mathbb R \rightarrow \mathbb R$ be  continuous  function  and  $A\subset \mathbb R$ be  defined  by  $$ A=\{y\in R : y= \lim_{n\rightarrow \infty} f(x_{n}) \text{ where } x_n \text{ diverges to } +\infty \}$$
Then $A$  is
A. Connected
B. Compact
C. Singleton
D. None  of  the  above
Now by taking $f(x)=\sin(x)$ I see C. do not hold but A. and B. do. But  how to ensure that what must be correct for all continuous functions or  not  and what special role the divergence of that sequence $x_n$ plays there?

As has been sort of said, $x\sin(x)$ is a counterexample to (B) and to (C).
But (A) is true. (And this is really awful notation, using "A" for a certain set and also for a condition that set may or may not satisfy).
It's enough to show that if $a,c\in A$ and $a<b<c$ then $b\in A$. Say $x_n\to\infty$, $f(x_n)\to a$, $z_n\to\infty$ and $f(z_n)\to c$.
For each positive integer $k$ there exist $n$ and $m$ such that $x_n>k$, $z_m>k$, $f(x_n)<b$ and $f(z_m)>b$. The intermediate value theorem shows that there exists $y_k$ between $x_n$ and $z_m$ such that $f(y_k)=b$. And $y_k\to\infty$, since $x_n>k$ and $z_m>k$.
