Asked in
Computer Programming
Grammar

What is meant by syntax rules of programming language and a natural language?

Answer

User Avatar
Wiki User
October 10, 2008 8:23AM

Syntax is defined as a set of rules governing how a language is structured, and the relationships between words, Just as in English * we don't put an adjective after a noun - "I have a car blue new" is wrong and "I have a new blue car" is correct... * and the placement of the verb affects the meaning of the sentence. "I have a new blue car" is very different from "Have I a new blue car".

So too do programming languages have rules which say how pieces of code must relate to one another, and in what sequence they must be phrased.