Same voltage of AC as DC (which does not give a shock) may give a shock because of the way AC voltage is measured. Let us say that tolerance of your body to experience a shock is 24 volts. So, you need a 24 V DC source to experience a shock. Whereas, in case of AC, even a source will be able to give you a shock. Because a 17 V AC source (which is the RMS value) has a peak voltage of 24 V (enough to give you a shock).
Read more about relation between RMS and peak value here: Measuring the Sine Wave
I like to blog about various topics ranging from education in IITs to social issues in India and US. All opinions and views presented here are my own and not of my employer.