Your question regarding how much length of the wing is filled with fuel has been answered well. If you are wondering how the location of the front and back walls of the fuel tank are determined and designed, here is the answer:
The existing wing structure of front and rear spars and upper and lower wing skins act as an integral wing fuel tank. When the wing is assembled sealant is applied between all parts to make the wing water-tight.
Integral wing tanks are primed with special yellow paint which acts as a barrier against the fuel to protect the aluminum structure.
Perfectly sealing the inside of the wing is very important. There are many Quality Assurance inspections and a final leak test.
The composite fixed leading edge and fixed trailing edge which complete the forward and aft section of the wing structure and contain the flight controls are attached to the front spar and rear spar respectively.
An airliner wing will have a "dry bay" just over the engine strut/pylon for safety in the event the engine were to experience a catastrophic failure where compressor or turbine blades were thrown into the wing tank.
On a 777 the Dry bay area is blocked out by a composite piece that is secured and sealed in place. Each wing will usually have one dividing wall in it in the vicinity of the engine pylon (everything inboard from that point is considered the center wing tank, including the center wing section/tank).
Airliners with 4 engines will have each wing divided into at least 2 sections (one to feed each engine). As you can see in the illustration in a previous reply, the 747-400 has 3 tanks per wing plus the little surge/vent tank at the very end.
The end of the wingtip will have a vent area where expanding fuel vapors can escape (and may be called a "surge tank"). Look for the little NACA intake duct on the underside of the wing, which also brings air in to replace the fuel that is being used by the engines so that the fuel can flow freely out of the wing without suction being created.
On modern airplanes especially (like the 777 and later) the very extreme end of the wing (beyond the surge tank) is not very substantial in construction (made of very thin material) and is therefore not used to store fuel.
The raked wingtips of the 767-400, 777-200 LR, 777-300 ER and 747-8 are extra extensions added on to the end of where the "official" wing box structure ends. These of course do not contain fuel because they are a very light, thin composite structure just strong enough to take aerodynamic loads.