Given $\lim_{x \to 0} \frac{f(x)}{x} = 1$, find $f(0)$ This is a question taken out of one of MIT's Single Variable Calculus Exams in 2010 (Obtained via OCW)

Problem :
Find $f(0)$, given that $ f $ is continuous at $ x=0$ and $$\lim_{x \to 0} \frac{f(x)}{x} = 1$$

Solution:
The official solution to this problem is quoted verbatim below :

Since $\lim_{x \to 0} \frac{f(x)}{x} = 1$, $f(x) \to 0$ as $x \to 0$, so $f(0)=0$
  


However what this solution has done (at least to me it seems this way), is simply, directly substitute $x=0$, into $\frac{f(x)}{x}$, and then solve for $f(0)$, but the way in which it is done, doesn't seem very rigorous (at least to me it doesn't).
This is essentially what the solution has done (at least it seems this way to me)
\begin{aligned}
       & \lim_{x \to 0}\ \frac{f(x)}{x} = 1 \\
       & \implies \frac{f(0)}{0} = 1 & \text{(By direct substitution)} \\
& \implies f(0) = 0 \cdot 1 & \text{(Can we even do this?)}\\
       & \implies f(0) = 0\\ 
     \end{aligned}
But is what is being done in the second and third steps even correct? I ask this because we have a denominator of $0$ on one side of the equation, and technically having $0$ as the denominator in one of the terms of an equation, makes the equation undefined, am I correct in saying this?
Essentially my question boils down to the fact that division by $0$ is undefined, and I am asking whether algebraically manipulating an equation that has one term, with a denominator of $0$, is mathematically valid or not, and whether this is seen as a rigorous solution to the posed problem.
 A: By the product rule for limits, as these limits exist,
$$\lim_{x \to 0} f(x)=\lim_{x \to 0} \frac{f(x)}{x}\cdot\lim_{x \to 0} x =1\cdot0.$$
But it is impossible to conclude anything about $f(0)$.
A: As some comments have pointed out, it is possible for $f(x)$ to have a discontinuity at $0$ and $f(0) \ne \lim_\limits{x\to 0} f(x)$
However, if $\lim_\limits{x\to a} \frac{f(x)}{g(x)} = M$ with $M$ bounded and $|M|>0$, then $\lim_\limits{x\to a} g(x) = 0 \iff \lim_\limits{x\to a} f(x) = 0$
If you want to be rigorous then you really should to recall the definition of limits.
$\forall \epsilon>0,\exists \delta>0$ such that $|x|<\delta \implies |\frac{f(x)}{x} - 1|<\epsilon$
$|f(x) - x|<\epsilon |x|$
A: If I found the correct exam on OCW, there's some important information from the question that was left out. I think this is question 6 from this exam: http://ocw.mit.edu/courses/mathematics/18-01sc-single-variable-calculus-fall-2010/1.-differentiation/exam-1/session-22-materials-for-exam-1/MIT18_01SCF10_exam1.pdf
The question is actually:
"Suppose that $f$ satisfies the equation $f(x+y) = f(x) +f(y) + x^2 y +xy^2$ for all real numbers $x$ and $y$. Suppose further that 
$$
\lim_{x \rightarrow 0} \frac{f(x)}{x} = 1. 
$$
Find $f(0)$."
So you can get the answer directly by plugging in $x=y,y=0$ into the given equation $f(0+0)=f(0)+f(0) +0 +0$ which gives $f(0)=2f(0)$ or $f(0)=0$.
A: Here is a very simple counter example. Consider $f(x)=\frac{sinx^2}{x}$ It is easy to see that $f(0)$ does NOT exist. As a limit, sure it does (it is zero) but $x=0$ is obviously not in the domain. However if you use this $f(x)$ in your limit we arrive at the expression $\frac{sinx^2}{x^2}$ and as a limit when $x$ approaches zero, this limit is $1$
