C language programming tutorial: Chapter 2 (Structure of C) – Short Notes

The structure of C programming language is :-

  1. Documentation Section
  2. Links Section(File)
  3. Definition Section
  4. Global Variable Declaration Section

The structure follows the syntax below:-

Characterstics of Structure:-

  • Documentation section consists of the comment lines which include name of program, author name, creation date, and other information.
  • Links Section is used to link the required system libraries or header file to a program.
  • Definition section is used to define or set values to variables.
  • Global variable declaration section is used to declare global or public variable.
  • Void main() is used to start the C program. It includes two parts as declaration part and executable part.
  • Variable Declaration section is used to declare private variable
  • Function declaration section used to declare functions of programs from which we get required output, and then executable statements are placed for execution.
  • Function definition section is used to define the functions which are to be called from main().

Process of compilation and execution:-

  1. Creating Program: – An editor like notepad or word is used to create a C program. This file contains the source code which consists of executable code and then the file is saved as ‘.C’ extension.
  2. Compiling Program: – The next step is to compile the program. The code is then compiled in a compiler. The compiler converts the code in the binary code.
  3. Linking a library to a program: – The code of the program is then linked with libraries that are needed for execution of a program. The linker is used to link the program with libraries. It creates a file with ‘.exe’ extension in windows and ‘a.out’ file in LINUX.
  4. Execution of Program: – The final executable file is then run by DOS command prompt or by any other software.


The link to other chapters is given below:-

Chapter 1 (Getting Started With C)


Leave a Reply

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