From the given choices, the sentence which does not contain any errors in punctuation and capitalization is:
B. A stout lieutenant shouted, "Attention!"
This is because of the following points:
1. A comma is placed after the word "shouted" to emphasize the dialogue of the subject.
2. The dialogue is correctly enclosed in quotation marks.
3. The initial letter of the first word in the dialogue is capitalized.
4. The exclamation point is placed inside the quotation marks because it is part of the dialogue.