0% found this document useful (0 votes)
20 views6 pages

MEHRAJ

Uploaded by

Yasser Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views6 pages

MEHRAJ

Uploaded by

Yasser Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

INTRODUCTION

OF C
PROGRAMMING
Basic Structure of C program
• DOCUMENTATION SECTION
• LINK SECTION
• DEFINATION SECTION
• GLOBAL DECRATION SECTION
CONT…
• Main() function section
• {
Declaration part
Executable part
• }
Cont…
• link section : It gives instructions to compiler to link the
built in functions from system library.
Ex: #include<stdio.h>
#include<conio.h>
Definition Section – It defines all the symbolic constants
Ex: define PI 3.14
Cont…
• Global Declaration section- Variables that are used in
more than one functions are declared in this section.
Ex:
int a= 10; // Global Variable
int add(){ int sub(){
printf(“%d”,a); printf(“%d”,a)
} }
Cont…
• main() Function Section – Every program must have a main function.
• It consist of two sections,
1) Declaration part
2) Executable part
Declaration part – Declaration all the needed variables for a program.
Executable part – At least one statement should be in the executable
part.
• Program execution begins the opening brace({) and ends at the
closing brace(}).

You might also like