Flam has given you a good reply, but here are other examples of using か in an indirect question.
どっちにすればいいか、わからなかった。 (I didn't know which one to pick)
何人がいたか見当もつかない。 (I have no idea how many people were there)
それをどこで買えるか知らない。 (I don't know where you can buy that)