Very often we find sentences which are not structured conventionally in the subject-verb-object format. Here is an example.
When they arrived at the seaside, out jumped all the children with a shout of joy
When they arrived at the seaside, all the children jumped out with a shout of joy
Are such sentences grammatically correct?