If 2 is a root of the equation $x^{2}+a x+12=0$ and the quadratic equation $x^{2}+a x+q=0$ has equal roots, then $q=$
(a) 12
(b) 8
(c) 20
(d) 16
$x=2$ is the common roots given quadric equation are $x^{2}+a x+12=0$, and $x^{2}+a x+q=0$
Then find the value of q.
Here, $x^{2}+a x+12=0$......(1)
$x^{2}+a x+q=0 \ldots .(2)$
Putting the value of $x=2$ in equation (1) we get
$2^{2}+a \times 2+12=0$
$4+2 a+12=0$
$2 a=-16$
$a=-8$
Now, putting the value of $a=-8$ in equation ( 2 ) we get
$x^{2}-8 x+q=0$
Then,
$a_{2}=1, b_{2}=-8$ and,$c_{2}=q$
As we know that $D_{1}=b^{2}-4 a c$
Putting the value of $a_{2}=1, b_{2}=-8$ and, $c_{2}=q$
$=(-8)^{2}-4 \times 1 \times q$
$=64-4 q$
The given equation will have equal roots, if $D=0$
$64-4 q=0$
$4 q=64$
$q=\frac{64}{4}$
$q=16$
Thus, the correct answer is (d)