What is Structure in C program - Ishwaranand

News

What is Structure in C program

Structure of C program

Q) Draw the structure of the C program. Also, give one example.
Q) Write and explain the structure of a C program.

Almost all programs are written using the following general structure.
structure of c program pdf, structure program for student details in c, structure of c program definition, structure of c program ppt, basic structure of c program pdf, structure of c program wikipedia, basic structure of c program wikipedia, general structure of c program, structure of c program ppt, documentation section in c, c syntax, basic structure of c++ program, c syntax review, union of c program, array of structure in c, typedef struct in c, union in c, nested structure in c, what is the size of ac structure, structure program for student details in c, struct exercises c, body of c programming, global declaration section in c, diagram of c language, structure in c quora, union in c studytonight, facts about union in c, difference between structure and array,
Image Source ~ Crafted With ©Ishwaranand - 2020 ~ Image by ©Ishwaranand
  • Document section:
This section consists of a set of comment lines that describe the name of the program, its purpose and other information.
E.g   /*
      This is my first C program
     */
  • Link section:
This section contents the instruction for linking the library function with the program. It generally contents #include preprocessor directive.
E.g.  # include  >studio.h>
  • Definition section:
This section is used to define the symbolic constants used in the program. It generally contents#define preprocessor directive.
E.g.
#define PI 3.14
  • Global Declaration Section:
This section is used for global variable declare and function declare used in the program.
E.g.
int maximum (int,int);
  • main() function section:
Every program must contain the function called main()function. The execution of a program is started from the main() function.

E.g. 
  voild main()
{
statements;
}
  • Sub-program section:
This section is used to define the user-defined function.
E.g.voild test()
{
....
}
  • E.g.
/*Document section (program for addition)*/
# include <stdio.h>  /* Link section */
void main()         /*main()function*/
{
int a=10, b=5, c;
c = a + b ;
printf("addition is =%d", c);
}

No comments

Comment on Ishwaranand or Happy Day
Not, Add any types of links