As a native (American) English speaker, none of those questions strike me as rude. True, you can phrase them in other ways to soften them if you prefer (for example, "Would you tell me..." or "I was wondering...") but I don't think that would be necessary in most situations. Generally, the best way to make these questions more polite has more to do with what you say to lead-in and follow-up, not with altering the wording of the questions themselves.
Here are some more specific responses and examples:
- Yes, it would be a little abrupt to simply walk up to someone and demand their name. However, it is a natural first question when meeting someone, and it can be more awkward in the long run not to ask. All it takes to make it sound more polite is starting with a simple greeting first, and remembering to introduce yourself, as well.
- You could introduce yourself first: "Hi, my name is _____. What's yours?"
- You could also lead into it with some small talk: "Hi, I don't think we've met. What's your name?" Then, of course, introduce yourself after they offer their name.
Most importantly, do your best to REMEMBER their name—it doesn't matter how polite you are if you fail to listen to their answer!
- Similarly, if you receive a call or a text message from an unknown number, this question is a natural response, and doesn't necessarily need anything additional to sound more polite. However, you could say something like:
- "Hi, who's this?" (my usual response)
- "I'm sorry, who is this?" (especially if the unknown speaker/texter begins to talk to you without an introduction, possibly assuming that they are speaking to someone else—in other words, this is my usual response to wrong number calls/messages)
- "Hello, this is _____, may I ask who I'm speaking to?" (very formal; more like something you'd hear from a secretary or receptionist)
- If you're making small talk or getting to know someone, this is a perfectly acceptable question as is. I think it would only be perceived as impolite due to timing or context. However, if there if there is something about the person which made you want to ask the question, you could mention that to give some context to the question and make it seem less abrupt. For example:
- "I can't quite place your accent. Where are you from?"
- "You mentioned that you arrived recently. Welcome! Where are you from?"
- This one is a little trickier. "What do you do?" is a little vague, and may even come across as hostile. "What do you do for a living?" or "What do you do for work?" makes the question more specific. Again, I think the lead-in and follow-up are more important, however.
- (lead-in) "You have such a unique perspective. What do you do for a living?"
- (follow-up) "Wow, I bet you meet a lot of interesting people through your work, then."
In short, asking polite questions is only 10% about the way you phrase the question, and 90% about the context—when you ask, tone of voice, how you lead-into the question, how well you LISTEN (really important), and how you follow-up in response to their answer.
Hope that helps!