C - Basic Structure with Example
Basic Structure of C Program :
Links Section (File)
Definition Section
Global variable declaration Section
main() function definition
{
Variable declaration section
Function declaration section
executable statements;
}
Function definition 1
Function
definition n
Simple C
Program
:
/* A simple
program*/ /*Document Section
*/
#include<stdio.h> /*Links Section
(File) */
#define pi 3.14 /*Definition
Section */
main() /*main()
fun. Definition */
{
int
x=5; /*Variable
declaration section */
printf(“Hello
student”); /*executable
statements */
printf(“Value
of a=%d”,x);
getch();
}
Comments
Post a Comment