Will my iPhone 4 get replaced?

I got my fathers iPhone 4 when he upgraded to an iPhone 5 and has been working fine. But suddenly it has a black screen and is refusing to turn back on. I've tried to reset it but it's not working.

It's not under warranty anymore but if I go to the Apple Store will they make me pay for a replacement or will they just give me another iPhone for free?
It's clearly a Software problem as I have never dropped my phone nor put it near water.

If i do need to replace it does anyone know how much it will cost me?

Book an appointment through the website, explain that you have not dropped it and it has not been damaged. Also say you haven't got any cash (whether you have or not). Most cases they will update it for your and it will be back to normal. I have seen people with iPhones 3 years old in the apple store who don't have extended warrants and they fix them for free.

They won't just give you a new one as it's not under the warranty anymore but i'm afraid i don't know how much it will cost too replace it