@tanguatlay,
Both are correct. The difference is one of tone.
The first example is two short sentences which sounds abrupt.
If you were punctuating direct speech and wanted to show the person was irritated by the question you would punctuate like that.
The second example is more relaxed so you would use it if there was no irritation or anxiety.