Step 1: Formula for converting a galvanometer into an ammeter.
To convert a galvanometer into an ammeter, the resistance \( R_s \) that should be connected in series with the galvanometer is given by the formula:
\[
R_s = \frac{V_g}{I_{\text{max}}} - R_g
\]
where \( V_g = I_g \cdot R_g \) is the potential drop across the galvanometer, \( I_{\text{max}} \) is the full scale current, and \( R_g \) is the resistance of the galvanometer.
Step 2: Calculating the series resistance.
Given \( I_g = 0.04 \, \text{A} \), \( R_g = 20 \, \Omega \), and \( I_{\text{max}} = 20 \, \text{A} \), we can find the value of \( R_s \). First, we calculate the potential drop across the galvanometer:
\[
V_g = I_g \cdot R_g = 0.04 \times 20 = 0.8 \, \text{V}
\]
Now, using the formula for \( R_s \):
\[
R_s = \frac{0.8}{20} - 0.05 = 4.95 \, \Omega
\]
Step 3: Conclusion.
Thus, the resistance to be connected in series with the galvanometer is 4.95 Ω, corresponding to option (B).