Mechanical and electrostatic properties of carbon nanotubes and nanowires