This is a really good question. You see, it depends which convention you follow. Under US convention (well, let's call it that for now), commas and periods tend to be inside. Under UK convention, they tend to be outside. Question marks and exclamation marks follow logic in both conventions. For example:
"Get out," she shouted (US)
"Get out", she shouted (UK)
Did she shout "Get out"?
She shouted "Why don't you get out?"
Hi, Is "grammar error" an American construction? I am Australian, and here we either say "grammatical error" with "grammatical" being an adjective used to describe the noun "error" or we say "an error in grammar"