These are sometimes called embedded questions, but if you look them up you'll find a variety of terminology in use, including "embedded interrogative content clauses" and "indirect questions".
I think the か in embedded questions is more or less the same か used to form regular questions. But there are a couple differences:
In an embedded question, it's okay to have だ before か:
1. [ 誰だか ] 分からない ← okay
In an embedded question, か generally can't be omitted:
2. デパートは [ どこにあるか ] 知っていますか? ← か can't be omitted
Another difference is that embedded interrogatives can function like nouns (for examples, see Satoshi Tomioka's paper Japanese Embedded Questions are Nominal, especially pages 8 and 9). In fact, we might want to say as a matter of theory that the か-phrase is the direct object of 知る:
3a. [ どこにあるか ]-を 知らない
3b. [ どこにあるか ] 知らない
We might choose to say that sentence 3b is derived from sentence 3a by omitting を. But in practice, it's usually omitted, particularly in conversation, and sometimes inserting を is strange, so I'm not sure if this is the right approach. (See our discussion in chat.)
We have embedded questions in English, too:
4a. What are you talking about?
4b. I don't know [ what you're talking about ].
In 4a we have a basic question, and in 4b we have the embedded question corresponding to 4a. Likewise, in Japanese, we can write:
5a. 何を言っているのか?
5b. [ 何を言っているのか ] 分からない。
As you can see, embedded questions straightforwardly correspond to main clause questions, although in each language there are small differences in syntax.