Yeah, B and C can be the same. It's worth noting that phrasing a question with "what were you doing" is more likely to be a sort of accusative question, i.e. implying that the person you're talking to is guilty of wrongdoing. Not always, and it largely depends on tone, but C is definitely the more conservative, safer question for that meaning, while for the other meaning A is safer, especially in writing.