A function f(x) is said be continuous at a if the following three conditions hold:
1) $\lim_{x \to a} f(x)$ exits
2) $ f(a)$ is defined
3) $\lim_{x \to a} f(x)$ =f(a)
Can we find an example for a case where condition 1 and 2 are met but condition 3 is violated so that it ended up making function not continuous ?
It is actually really straightforward : to find an example take any continuous function (let's say $f$) at any point $k$.
then what you do is you define $$\left\{ \begin{aligned} &g(x)=f(x) \,\forall x\neq k \\ &g(k)=a \\ &\forall a\neq f(k) \end{aligned} \right.$$
This actually works for all $f$ continuous at point $k$
For example let's say $f(x)=x^3-x.$ at point $k=3, f$ is continuous, and $f(3)=24$. We'll just set, according to what is said above : $$\left\{ \begin{aligned} &g(x)=f(x) \,\forall x\neq 3 \\ &g(3)=1\neq 24\\ \end{aligned} \right.$$
$g(3)$ is defined, $\lim_{x\to 3} g(x)=24$ exists, but $$g(3)=1\neq \lim_{x\to 3} g(x)$$ Hence $g$ is not continuous at 3
It is however continuous for every other point in $\mathbb{R}$.