The first known reference to the term "cockpit" comes from the rather barbaric sport of cockfighting and refers to the pit in which the fights occurred. Shortly thereafter, the word naturally attained a connotation as being related to any scene of grisly combat, such as European battlefields. By the end of the 16th Century, the term was being used to describe sunken pits or cramped, confined spaces. In particular, the word cockpit was used to describe the pit around the stage in a theater containing the lowest level of seats. However, the more direct linkage comes from the use of the term cockpit to refer to a compartment below decks on a British naval vessel beginning around 1700. The often cramped and confined compartment was placed below the waterline and served as quarters for junior officers as well as for treating the wounded during battle. Although the purpose of this compartment evolved over time, it's name did not.
Even today, a room on the lower deck of a yacht or motor boat where the crew quarters are located is often called a cockpit. In addition, the rudder control space from which a vessel is steered is sometimes called a cockpit since a watchman in the highest position is called a ***, and a cavity in any vessel is called a pit.
This sense of the word, as an often confined space used for control purposes, was first applied to an aircraft around 1914 by pilots during World War I. In keeping with this same meaning, the tightly confined control space of a racing automobile also became known as a cockpit by about 1935.
The Flightdeck is an elevated compartment (in certain aircraft) containing the instruments and controls used by the pilot, copilot to operate the aircraft.
The Boeing 747-100 which had an elevated cockpit compartment is called a flightdeck.
The Airbus A-320/Boeing 737 has a cockpit because it is not elevated.
Maybe you can shine some new light on this, we look forward to your feedback.
Gravity always wins!