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