syntax in C language

Syntax in C language

The structure of the C programming is the way by which the c program syntax format are presented.


It it the format use when coding, when writing c program codes the format by which the syntax are presented in the coding area of any IDE you are using can be see in the image of the structure of C program below.


The Header includes the library of c into the program before the execution of program.


The Main() function is the function which is called the entry point of any program.

The execution of any program starts from the main function. If in a program there is only one function then it should be main function.


Have you signed up with Rakuten yet? It's the best site for earning Cash Back. Get a $40 bonus when you sign up with the link below and spend $40. It's free! 🤩

sign up now!



The declaration of variables comes anytime after the main function, but it is advisable to declare all variables after the main function. Variables are the name of location where any form of data types can be stored for use.


The Body part of the c syntax is the area where you write in the source code of the program you are working on, the body part represent the code instruction the computer carries out after you run the program, then the computer reads through and gives execute result of the programs instruction.


The Return statement part of the C program ends the execution of a function, and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can return a value to the calling function.


Stdio:

    1. It stand for standard input output.

    2. It is a collection of predefined                     functions/methods.

    3. It is also called library of C.

Include:

To include the header file into the program.

#:

    1. It is called preprocessor.

    2. Ie includes the library of C into the program     before the execution of program.


Conio:

    1. It stands for console input output.

    2. It is used to show the output on console         winsow.


Void:

    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, float,             char, etc in place of void then we will use                    return     keyword.


Main:

1. It is the function which is called the entry point of any program.

2. The execution of any program start from the main function.

3. If in a program there is only one function then it should be main function.


Clrscr:

1. It stands for clear screen.

2. It is a predefined function which is use to clear the output screen.

3. It acts like a duster on output screen.

4. It is defined in the conio.h header file.



Have you signed up with Rakuten yet? It's the best site for earning Cash Back. Get a $40 bonus when you sign up with the link below and spend $40. It's free! 🤩

sign up now!



printf:

1. It is a predefined function which is use to print information or data on to the output screen.

2. It is defined in the stdio.h header file.


getch:

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.


Comments

Popular Posts