As a computer repair technician who has repaired dozens (if not hundreds by now) of this exact issue over the years, I can tell you that you CANNOT assume it is either the port or the cable without direct examination. It could be either, and it would be irresponsible to say definitively which is it.
That said, you can take a look and see for yourself. If it is the plug on the end of the cable, the damage will most likely be visible as the cord would be separating, or the braided ground shielding will be showing, etc. If the barrel end of the cord itself is damaged in some way, separating from the plastic or crushed, then this too would be plainly evident. It is possible that the AC/DC adapter brick portion of the cord is damaged, but for that, you'd need multimeter.
The port on the laptop can easily tell you if it is broken without taking it apart. If the laptop DC jack has a pin in the center, and that pin is wobbly (aka, touch it with tweezers or a pencil eraser, etc) chances are, it's not making a solid contact any more. The plastic housing of the DC jack might be broken from the cable taking one too many hits, and that would be harder to see... but if there's no visible damage on the end of the cable, and the center pin on the DC jack isn't wobbly, then the damage is most likely in the plastic housing of the jack itself.
Repair? If it's the cord or the end of the cord, replacing the cord is the easiest repair. You could purchase a new end at Radio Shack and cut the old end off, but that does take a basic level of skill... it is not easier than just purchasing a new DC adapter. If the issue is the DC jack however, that does take a bit more skill... and I would not recommend it for a beginner.
A DC jack will run you between $3 and $10 on EBay, so the parts aren't that expensive. It's taking the laptop apart, and de-soldering the old jack off the motherboard that is tricky. My ex-boss had ruined many motherboards by forcing the old DC jack off the board, removing the tin collars that the jack's pins were set into, so that the soldering job on the new one no longer made contact on both sides of the motherboard. So, it's best left to a repair shop if you aren't really handy with a soldering iron.
An alternative, is to purchase a two contact connector like this, and step away completely from the pin-barrel design that has already proven to be shoddy. Then, you simply solder in two wires in place of the DC jack (one to the positive connection where the center pin was connected, the other to one of the many ground connections), knot or fasten the cable inside the casing BEHIND the hole the DC jack used to go out of, and connect one of those two contact connectors to the wires. Then, remove the end from your DC adapter, and connect the mate for that two contact connector. Why would you do this?
Any future pull on the power cord would re-orient the cord in the direction of the pull, and then separate the two contact connectors, rather than snapping the DC jack in the pin-barrel design.
It is a cheaper fix than getting a DC jack.
It is reversible, should you choose to get a DC jack in the future.
It is most likely the cable, not the female or male connector. – danielcg – 2013-04-02T21:48:00.827
No, it isn't the cable because I bought a new AC adapter and have the same issue. The problem seems to be with the alignment of the connector inside the laptop. – THE DOCTOR – 2013-12-26T17:12:07.303