Can だ ever be used in a question?


I learned in Tae Kim's Grammar Guide that だ cannot be used when asking a
question. But in the book [Japanese Sentence Patterns for Effective
Communication](http://rads.stackoverflow.com/amzn/click/4770029837) by Taeko
Kamiya, I found several example sentences that used だ in a question. I also
have seen it being used this way in anime.

I'm guessing there is some type of exception to all of this? Anyways, I hope
someone can shed some light on the subject for me. :)

== EDIT ==

Here is an example from the aforementioned book:

> どうしてゆうべ来なかったんだ？ (Why didn't you come last night?)

  
And here is an example from the title of the 249th episode of the show Dragon
Ball Z:

> 悟飯はどこだ!? (Where's Gohan!?)




Yes, it can be used in a question, as long as the sentence also contains a
question word: だれ, なに, どこ, etc.

  * 誰だ？ = Who's there? 
  * 何やってんだよ = What (the hell) are you doing? - (Note that よ can be added at the end)

Both of your examples fit this pattern: どうして and どこ are the question words.

Without a question word, you are much less likely to see this pattern,
although there are a few special/edge cases that might technically count as
use of だ. For example: "友達だぁ？・・・ふざけるな！" = "'Friends'?! Don't give me that
crap!"

Update: As Axioplase says in comments, this is a ~~very informal~~ non-polite
way of asking a question (it is だ, not です, after all), and can also carry a
"confrontational" or "accusatory" nuance -- especially when combined with ん,
when it becomes less a question ("what are you doing?") and more of a demand
for an explanation ("why are you doing that?").




Yes, it can be used in a question, as long as the sentence also contains a
question word: だれ, なに, どこ, etc.

  * 誰だ？ = Who's there? 
  * 何やってんだよ = What (the hell) are you doing? - (Note that よ can be added at the end)

Both of your examples fit this pattern: どうして and どこ are the question words.

Without a question word, you are much less likely to see this pattern,
although there are a few special/edge cases that might technically count as
use of だ. For example: "友達だぁ？・・・ふざけるな！" = "'Friends'?! Don't give me that
crap!"

Update: As Axioplase says in comments, this is a ~~very informal~~ non-polite
way of asking a question (it is だ, not です, after all), and can also carry a
"confrontational" or "accusatory" nuance -- especially when combined with ん,
when it becomes less a question ("what are you doing?") and more of a demand
for an explanation ("why are you doing that?").

