1580s, "a pit or enclosed space for fighting cocks," from cock (n.1) + pit (n.1). Used in nautical sense (1706) for midshipmen's compartment below decks; transferred to airplanes (1914) and to racing cars (1930s).
cockeyed
cock-fighting
cockhorse
cockle
cockney
cockpit
cockroach
cockscomb
cockspur
cocksucker
cocksure