What is need of Syntax?

What is need of Syntax?

While learning any language we first learn its alphabets then its form words then sentences and then paragraphs.
Similarly in C we have variables constants,loops,etc and all have their own syntax.
C is high level language(Human understandable).
But, computer understands only binary values of 1's and 0's.
Computer does not understands our english like languages.
So, compiler converts are english like language to 1's and 0's.
Also, compiler checks syntax.
If syntax is not correct it gives error. 



Summary:
Syntax is format of our code as expected by compiler.

No comments:

Post a Comment