Using か after plain form.
Q: Here is a sentence.
Is it correct to say (あなたは)あの店まで歩いて行きたいか。 as an interrogative sentence?
A：You should avoid putting か after plain form.
(あなたは) あの店まで歩いて行きたいですか。would be safe to use.
Q：Doesn't か of the ending make a interrogative sentence? What's wrong with 行きたいか?
A: Using か after the plain form in the belief that is simply the plain form of ですか.
If you say something like 誰かいるか? you are basically challenging for a response; you expect that there is nobody there. It's a very blunt expression that is lower on the politeness scale than simply 誰かいる？ or 誰かいるの? It often indicates a sarcastic or rhetorical questions. 分かるか? is not just "Do you understand?", it's more like "Do you understand [and you better not answer "no"]?" or "Do you understand [this thing that you should have already known]?"
So, it's one of those "yes, it gets used, but don't use it until you really understand what you're doing." It's similar to using 俺 as a general-purpose casual substitute for 私.