THE GENERAL FORM OF A C PROGRAM AND ITS DESCRIPTION

The General Form of C program

THE GENERAL FORM OF C PROGRAM

Initially, the use of C was for Systems programming. But as C developed in popularity, many programmers  started using it to program all tasks​. WHY !? The simplest answer is because of its PORTABILITY and EFFICIENCY. And YES, also because they LIKED it.. Thus, Let’s have a look at the General form of C PROGRAM..

Technically speaking, one can easily create a Useful and Functional C program. A program that consists only of the statements that one actually created. However, this is quite rare as C does not provide any Keywords that performs such things. Things such as Input-Output operations, High level mathematical computations, etc. As a result, most programs include calls to various functions contained in the Standard library.

All C programs consists of one or more FUNCTIONS. Every Function is a collection of statements and perform some specific task. However, the only function that must be present in the program is called main( ).

main( ) is the first function which the compiler calls when program execution begins. It is the first function which the compiler executes in the whole program. In a well written C code, main( ) contains what is, in essence an outline of what the program actually does. The outline composes of function calls.

The General Form of C program is illustrated below :

The General form of C program
http://vakratundcloud.blogspot.in

DESCRIPTION OF GENERAL FORM OF C PROGRAM

1. DOCUMENTATION SECTION –

The Documentation section is that part of a C program which consists of a set of Comment Lines.

First of all, we use comment lines for giving the Name of the program, the Programmer’s name and other details which the programmer would like to use later. Furthermore, good Programmers also use comment lines for individual description of statements used in the programs.

We can place comments anywhere in a program. Also, comments are written between Delimiters. Comment lines are of two types i.e. SINGLE LINE COMMENT and MULTI LINE COMMENT.

The comments that we place between delimiters i.e. “/*” and “*/” are Multi-line comments. And the comments that we place after delimiter i.e. “//” are Single-line comment.

In C Language, we use MULTI LINE COMMENTS for documentation purposes.

EXAMPLE : 

//This is a Simple Addition Program (SINGLE LINE COMMENT)

/*This is a Simple Addition Program*/ (MULTI LINE COMMENT)

Leave a comment

Your email address will not be published. Required fields are marked *

12 thoughts on “THE GENERAL FORM OF A C PROGRAM AND ITS DESCRIPTION”