Edit:
What if address is not changed to address C? for example what if address A still has some funds?
Thats not possible. Every input (former unspend output) has to be spend entirely*. You could use A as your changeaddress however. This would send the funds back to A. It wouldnt allow you to use the same TX though, since its a new unspend output with different properties.
*everything that is not spend will be considered a minersfee IIRC.
All funds from a single unspent output must be spent entirely in the same transaction (or miners fee), however if there are multiple unspent outputs on a single address, they can be spent separately.