ac current meter using acs758 hall sensor

adc_zero = 512; //as read when there is no current on the load
sensitivity = 0.04; //as read from datasheet
currentdc = (adc_raw - adc_zero) * 5/(sensitivity * 1024)

That's a confusing order, I'd apply conversions one-by-one:

adc_zero = 512; //as read when there is no current on the load
sensitivity = 0.04; //as read from datasheet
amps_per_volt = 1.0 / sensitivity ;
fullscale_volts = 5.0 ;
fullscale_count = 1024.0 ;
ampsdc = ((adc_raw - adc_zero) / fullscale_count) * fullscale_volts * amps_per_volt ;

I'd always choose a name with explicit unit if possible "current" might be amps, milliamps or microamps, whereas "amps" is unambiguous.