What is the function of を in the sentence:
あなたは何をしていますか?
Why can't it be written without it, like:
あなたは何していますか?
What is the function of を in the sentence:
あなたは何をしていますか?
Why can't it be written without it, like:
あなたは何していますか?
'を' is a particle that is used mainly as an object particle to
indicate a direct object of action.
Therefore, it needs to be used as you are asking what the object of doing is in the question.
I am doing my homework.
could be translated to
[宿題]{しゅくだい}をしています.
In formal Japanese, it is better not to omit 'を' in the sentence.