A postcondition is a verifiable consequence of the statements that have just been executed. When you are writing a program, preconditions and postconditions can be helpful in fitting parts of the program together correctly. If you notice that a precondition occurs at a certain point in a program, you can make sure that the precondition is a postcondition of the preceding statements. That is, the precondition is a requirement that has to be met, and you should make sure that the code you have written will guarantee that the precondition holds. Explain the terms syntax and semantics .
Syntax refers to the grammar of a language.
It is the set of rules that specify what is considered legal in the language. In the case of a programming language, a syntactically correct program is one that can be compiled. If a program contains a syntax error, the computer will refuse to compile and run it. Semantics, on the other hand, refers to meaning. He recoils in horror from his creation and abandons it.