Would i get a replacement iphone 4s?

If my volume buttons stopped working and still under warranty

Possibly. It all depends on what warranty or plan you have. I'd call your provider and check.

If it doesn't, you can always go to settings - general - accessibility, then scroll down to 'physical and motor' and flip 'Assistive Touch' ON. Then, you can change the volume, lock your phone, etc.without any of the buttons on your phone.