For a quadratic equation \( ax^2 + bx + c = 0 \) to have real and equal roots, the discriminant must be zero.
The discriminant is calculated using the formula: \[ D = b^2 - 4ac \]
For the given equation \( x^2 + 4x + k = 0 \), the coefficients are \( a = 1,\ b = 4,\ c = k \).
Applying the condition for equal roots, we set the discriminant to zero: \[ D = 4^2 - 4(1)(k) = 16 - 4k = 0 \]. Solving for k yields \( 4k = 16 \), which means \( k = 4 \).