Concept:
To evaluate a definite integral, first find the antiderivative and then apply the Fundamental Theorem of Calculus:
\[
\int_a^b f(x)\,dx
=
F(b)-F(a),
\]
where \(F'(x)=f(x)\).
Step 1: Integrate the polynomial
Given,
\[
\int_0^1 (3x^2+2x+1)\,dx.
\]
Integrating term by term,
\[
\int 3x^2\,dx=x^3,
\]
\[
\int 2x\,dx=x^2,
\]
\[
\int 1\,dx=x.
\]
Therefore,
\[
\int (3x^2+2x+1)\,dx
=
x^3+x^2+x.
\]
Step 2: Apply the limits
\[
k
=
\left[x^3+x^2+x\right]_0^1.
\]
Substituting the upper limit:
\[
1^3+1^2+1
=
3.
\]
Substituting the lower limit:
\[
0^3+0^2+0
=
0.
\]
Hence,
\[
k=3-0.
\]
\[
k=3.
\]
Therefore,
\[
\boxed{3}.
\]