How to Declare C Program with Syntax?

C Programming is one of the most powerful programming languages, It is used to write computer programs for a variety of applications. C language doesn’t follow any specific method of writing a program. It is a case-sensitive language. All the statements must be written in lowercase letters (small letters).

How to Declare a C Program?

<header files>
<Global declaration of variables>
 <Local declaration of variables>
<sub programs - function blocks>

Declaration of C Programming:

1. The header files or preprocessor directives give instructions to the compiler to include compiler options (#include), macro substitution (#define) to substitute a constant for an identifier and conditional (#ifdef) directives.

2. The main statement block, function block and any other blocks used in a C program are enclosed in braces {}.

3. Variables declared outside main() are called global variables, and they can be used in the main program block and subprogram block.

4. Variables declared inside main() are called local variables, and they are used only in the block in which they are declared. Subprograms/functions can also have local variables.

5. Any C program has coding in the form of letters and symbols. Normally documentation of the program is made by adding remarks or comment lines enclosed in /* and */ wherever necessary.