Both signs encapsulate statements that make an exclamation or a question or both.
In the usage of both it is very important to have the following considerations:
- They have to be used at the beginning and the end of the statement.
- It is mandatory in Spanish to use them. It will not be ignored as in the spelling of other languages that use only the ending mark because they have other grammatical rules that help identify the beginning of the statement (question or exclamation)
For example in Spanish you can ask:
¿Estás comiendo en el restaurante?
and the equivalent in English would be Are you eating at the restaurant?
In this case, in English, you have the word order that lets you know that it is a question. You can formulate exactly the same sentence in Spanish Estás comiendo en el restaurante.
that would have another meaning and tone.
- You never put a point at the end of the statement. The question or exclamation mark already delimits the end.
It was implemented in 1754 on the second edition of Ortografía de la real academia because there are many cases in which you can't tell if the statement is a question or not, even if the ending has a mark, you won't know where the question begins. For instance:
Susana se fue de la casa muy tarde y después se fue a donde sus amigos por la noche?
In this case what is the question? Did Susana leave the house late? Did she go to her friends house? Did she go at night?
Possible Fix:
Susana se fue de la casa muy tarde, después, ¿se fue a donde sus amigos por la noche?
There are other alternative fixes. But I'm too lazy to write them.
Nota: Please remember that it is important to know that these are statements when inside a sentence, and sentences when on their own!!!
Examples:
Statement form:
Susana, ¿has decidido qué vas a hacer?
Pepe, ¡cuánto me alegro de que hayas venido!
Si no responde, ¿qué le vamos a decir?
Sentence form:
¿Has decidido qué vas a hacer, Susana?
¡Cuánto me alegro de que hayas venido, Pepe!
¿Qué le vamos a decir si no responde?
There are other uses for the inverted question marks, for instance to express irony or doubt, but in those cases it is mandatory the use of parentheses.
Examples:
José Pérez Segovia es el presidente (?) de la asociación.
Tendría mucha gracia (?) que llegara a la cita con un día de retraso.
And exclamation marks to express surprise or irony:
Un joven de treinta y seis años (!) fue el ganador del concurso de composición.
Está más gordo que nunca, pero dice que sólo pesa ochenta kilos (!) en la báscula de su casa.
If someone finds better examples don't hesitate to edit the answer.
Sources: