Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
Introduction [cont'd]
Input Output Functions [cont'd]
Structures and Unions [cont'd]
# Preprocessor [cont'd]
Structure of C Program in Introduction of Programming in C
1964 Views
Structure of C Program 
C language is structured language. C Program statements should follow some sturcture or fixed places to include different type of statements. Like variable declaration and user-defined functions.
Program Structure
Header files Declaration
Definition section
Global declaration

void main(){
   Variable Declaration
   Executable Statements
}

User defined functions
Header files Declaration 
Header files has pre-defined functions to form statements. '.h' is the extension of C header files. Program can include header files using #include proprocessor.

Example.
#include "stdio.h"
#include
Definition section 
#define is one of c preprocessor to define global constant definitions.

Example
#define PI 3.14
Global declaration 
Declaring global variables which are going to use across all functions.
Variable Declaration 
Variable declaration part which are going to use with further statements.
Executable Statements 
Set of statements or instructions to be defined in this part.
User defined functions 
User can create their own functions called as user-defined function which provides different functionalities. This function can call from main() function and other user-defined functions.
Previous Topics
Previous lessons of current book.
Introduction of Programming in C
Introduction of Programming in C
Best Lessons of "Programming in C"
Top lessons which are viewed more times.
Structures and Unions of Programming in C
Input Output Functions of Programming in C
Structures and Unions of Programming in C
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details