Qui as a subject in a question with inversion or est-ce que
When qui is used as the subject of a question, can you still use inversion and est-ce que?
So like in the sentence: "Who has a pencil?" who is the subject, so with inversion, would you treat it like any other pronoun and invert it as, "A-qui un crayon?"<pre>
"Who has a pencil?" with est-ce que, can you still place it in front of the subject if the subject is who? Would it be, "Est-ce que qui a un crayon?"</pre>
The simplest way to phrase it is "Qui a un crayon ?" which will work in all contexts regardless of formality.
With "est-ce que/est-ce qui", you have to put the interrogative pronoun before it if there is one:
"Qui est-ce qui a un crayon ?"
(note that 'est-ce qui' is used here instead of 'est-ce que' because it is the subject of the sentence)
In the colloquial language, "qui est-ce" may be replaced by "c'est qui", giving:
"C'est qui qui a un crayon ?"
Note that these two wordings, especially the latter, are usually considered very unelegant because of the repetition of the word 'qui'
In these types of "est-ce que" questions, it is mandatory that a subject comes after "est-ce que." Therefore, "Qui est-ce que [verbe]" is not an acceptable clause.
As such, these questions must either be formulated without the use of "est-ce que" or without the use of "qui."
*Quelqu'un means somebody, but often replaces "qui" in questions of this sort that are not inversions or "est-ce que" formations.
Who has a pencil? = Qui/Quelqu'un a un crayon ?
Who has a pencil? = Est-ce que quelqu'un a un crayon ?
Who would be willing to take out the trash? = Qui/Quelqu'un serait disponible à sortir la poubelle ?
Who would be willing to take out the trash? = Est-ce que quelqu'un serait disponible à sortir la poubelle ?
Beside the correct grammar rules (that some people explain very well) you can hear sometimes "qui est-ce qui ..?" . "qui est-ce qui a pris le crayon ? " " qui est-ce qui a fait ça ? "
Well..no need to say that it is bad french , it's not good grammar at all but you can hear it . It's more complicated to say , but weirdly the spoken language doesn't always evolve the simplest way...