Consider the Chemical Reaction first:
Reaction: H₂SO₄ + 2 NaCl → 2 HCl + Na₂SO₄
Now, Given mass of NaCl = 30 g
Molar mass of Nacl = 58 g/mol
Now, Number of moles of NaCl = 30/58 = 0.517 mol
Balance the equation, For every 2 molecules of NaCl, 2 molecules of HCl formed, so the number of moles would be same.
Hence, Number of moles of HCl = 0.517 mol
Now, Mass of HCl = Molar mass of HCl * Number of moles
Mass = 36 * 0.517 [ Molar mass of HCl = 36 ]
Mass = 18.62 g
In short, Your Answer would be: 18.62 Grams
Hope this helps!