Can I exchange my iPhone cable at the apple store?

The cable for the iPhone 5s that I bought recently stopped working (I can see where the break is). Can I just show up at an apple store and exchange it for a working one?

I didn't buy it at an Apple store, but at an AT&T store online and don't want the hassle of having to send it back and then wait for replacement.
.

You can if you have its bill & its in warranty and if you didn't broke the wire