Design of carbon doped ZnO nanostructures towards enhanced visible light driven photocatalytic and photoelectrochemical performance.