Major Parts of a C program with proper example


 
 
/*
        01. Documentation Section:
        Name: Alamgir Hossain
        Date: 23/08/2020
        For knowing about major parts.
*/
#include<stdio.h>//02. Linking Section/Part
#include<math.h>
#include<string.h>
#define abb 3.5670 //03. Definition Part
int x = 5;//04. Global Declaration Part
int y = 10;
char ch = 'c';
int main()//05. Main program section
{
        int  p =10;///Local Declaration
        prime();
        printf("%d\n", x);
        return 0;
}
void prime()//06. Sub-Program Section
{
        //printf("%d\n", p);
        int w = 200;
        printf("%d\n", x);
        printf("Welcome to Prime University\n");
}



No comments:

Post a Comment