An endoscope includes a mounting and detaching section, terminals that, when an adapter is mounted on an outer circumference, come into contact with an identification resistor provided in the adapter and having different resistance values for each of adapters, a lead wire that energizes the identification resistor via the terminals, and a flexible board electrically connected to the terminals in the mounting and detaching section and electrically connected to a distal end of the lead wire in a position behind the mounting and detaching section.