Concept:
For a function \( f(x) \) to be continuous at a specific point \( x = a \), the limit of the function as \( x \) approaches \( a \) must exist and be equal to the value of the function at that point:
\[
\lim_{x \to a} f(x) = f(a)
\]
Step 1: Evaluate the limit of \( f(x) \) as \( x \to 0 \).
We need to find:
\[
\lim_{x \to 0} f(x) = \lim_{x \to 0} \left( x^2 \sin \frac{1}{x} \right)
\]
We can evaluate this limit using the Sandwich (Squeeze) Theorem. We know that the sine function is bounded between \(-1\) and \(1\) for all real arguments:
\[
-1 \le \sin \frac{1}{x} \le 1
\]
Step 2: Apply the inequality bounded limits.
Multiply the entire inequality chain by the non-negative term \( x^2 \) (since \( x^2 \ge 0 \) for all real \( x \)):
\[
-x^2 \le x^2 \sin \frac{1}{x} \le x^2
\]
Taking limits as \( x \to 0 \):
\[
\lim_{x \to 0} (-x^2) = 0 \quad \text{and} \quad \lim_{x \to 0} (x^2) = 0
\]
Since the lower and upper bounds both approach 0, by the Squeeze Theorem:
\[
\lim_{x \to 0} \left( x^2 \sin \frac{1}{x} \right) = 0
\]
Step 3: Equate the limit to the value of the function at \( x = 0 \).
From the function definition, the value at \( x = 0 \) is:
\[
f(0) = k(0 + 1) = k
\]
For continuity at \( x = 0 \):
\[
\lim_{x \to 0} f(x) = f(0) \quad \Rightarrow \quad 0 = k
\]
Thus, \( k = 0 \), which matches option (D).