Mechanical properties and structure of diamond-like carbon