Structure Of C Programming

Definition Of C

C is a general-purpose programming language developed in the Bell telephone Laboratories by DENNIS RITCHIE that is extremely popular, simple and flexible. It is machine-independent, structured programming language which is used extensively in various applications. It is an outgrowth of two earlier languages, called BCPL and B.

It is a high-level programming language. However, often referred as a middle-level programming language; since it provides rich support to low-level programming constructs.

Basic Structure Of C :

Document Section

The documentation section contains a set of comment including the name of the program other necessary details. Comments are ignored by compiler and are used to provide documentation to people who reads that code.

Link Section:

The link section consists of header files while contains function prototype of Standard Library functions which can be used in program. Header file also consists of macro declaration


 #include <stdio.h>

Definition Section

The definition section defines all symbolic constants. A symbolic constant is a constant value given to a name which can't be changed in program. Example

 #define PI 3.14

Global Declaration

Global declaration section consists, global variables and user defined functions are declared.

The main() function:

This is the function with which the operating system will start execution. Each and every C program must have one and only main() function, defined as follows.

   variable declaration;
   program statements;

variable Declarations:

All variables used in C language programs must declared. C variable declarations includes the name of the variable and its type.

Executable Statements:

executable statements must have variable declarations. An executable statement is an expression followed by semicolon or a control construct such as IF or an WHILE statement.

Simple Program In C

Features of C:

  • structured programming language
  • Simple, Robust and Case Sensitive
  • Portable and Rich Library
  • Memory Management and Speed
  • Platform dependent and Compiler based
  • Machine Independent or Portable
  • Mid-level programming language
  • Pointers, Recursion and Extensible
  • It has Limited Number of Key Words
  • It can also handle low-level prograramming

Applications of C

Mainly C Language is used for Developing Desktop applications and system softwares. Some application of C language are given below.

  • Operating Systems
  • Interpreters
  • Assembly Programs
  • Text Editors
  • Compilers
  • Utilities

Because of its portability and efficiency C is also used for variety of applications running under nearly all operating systems.

The C language is used for developing

  • Database systems.
  • Graphics Packages.
  • Spread sheets.
  • CAD/CAM Applications.
  • Word processors.
  • Office Automations.
  • Scientific and Engineering Applications

Because of its power, elegance, and portability, C will probably continue to flourish as preferred software development tool.