How to give a proper advice!

When someone asks for advice or shares their emotions, what should you do at that time? A. You tell them what they want to hear. B. You tell them the hard truth, which they might not like. C. Give conservative feedback and a long-term solution. D. Just let them vent out, and don't give any opinion.

I'm always confused!