Concept:
• Total number of functions from a set with \(m\) elements to a set with \(n\) elements is \(n^m\).
• Number of injective functions from \(A\) to \(B\) is
\[
{}^{n}P_{m}
\]
provided \(n\ge m\).
Step 1: Find the total number of functions.
\[
|A|=3,\qquad |B|=4
\]
Hence,
\[\begin{aligned}
\text{Total functions}
=
4^3
=
64
\end{aligned}\]
Step 2: Find the number of injective functions.
\[\begin{aligned}
{}^{4}P_{3}
=
\frac{4!}{(4-3)!}
=
24
\end{aligned}\]
Step 3: Find the number of non-injective functions.
\[\begin{aligned}
64-24
=
40
\end{aligned}\]
\[\begin{aligned}
\boxed{40}
\end{aligned}\]
Hence, option \(\mathbf{(C)}\) is correct.