Syntax of C Language

Syntax means set of  rules that define the structure of any language and it tells the computers how to read code. Syntax in any computer programming languages like C, C++, Java etc means the rules that control the structure of the symbols, punctuations, and words of a computer programming language.

Each computer programming languages have their own syntax and words for syntax and we have to write the code according to their syntax otherwise we will get error if we do not follow the syntax of particular language.

Suppose that we write the code for any program and that code does not match with the syntax of any programming then is will not be understood by compiler and when compiler will not understand the code then it will not convert it into binary code or machine language that computer can understand so finally we will get an error as a result. 

Interpreters are used to check the code line by line and it is used to execute computer programming  languages such as JavaScript or Python at runtime. The incorrect syntax will cause the code to fail.

Therefore to become a good programmer you should pay close attention to syntax of programming languages so that you can run any kind of programs successfully.

Syntax of C language is given below


1.It stands for standard input output.
2.It is a collection of predefined functions/methods.
3.It is also called library of c.


To include the header file into the program.


1.It is called preprocessor.
2.It includes the library of c into the program before the execution of program.


1.It stands for console input output.
2.It is used to show the output on console window.


1.It is a keyword.
2.It indicates that no one value is being returned by the function.
3.If we use any other keywords like int or float or char etc in place of void then we should use return keyword.


1.It is the function which is called the entry point of any program.
2.The execution of any program starts from the main function.
3.If in a program we use only one function then it should be main function.


1.It stands for clear screen.
2.It is a predefined function which is used to clear the output screen.
3.It acts like a duster on output screen.
4.clrscr() function is a pre-defined function in the conio.h header file.


1.It is a predefined function which is use used to print data or information on to the output screen.
2.printf() function is a pre-defined function in the stdio.h header file.


1.It is a predefined function which is used to hold the output screen.
2.It acts like a duster on output screen.
3.It is defined in the conio.h header file.

Post a Comment