Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
11.3k views
in Computer by (60 points)
edited by

Explain the Basic Structure of C program in detail.

Please log in or register to answer this question.

1 Answer

0 votes
by (44.1k points)

Basically structure of the C program is divided into six different sections,

1. Documentation section: The Documentation section consists of a set of comment lines.

2. Link section: The link section provides instruction to the compiler to link the header files or functions from the system library.

3. Definition section: The definition section defines all symbolic constants such by using the #define directive.

4. Global declaration section: There are some variables that are used in more than one function, such variables are called global variables.

In C there are two types of variable declaration,

Local variable declaration: Variables that are declared inside the main function.

Global variable declaration: Variables that are declared outside the main function.

5. Main function section: Every C-program should have one main() function.
This section contains two parts:

Declaration part

Executable part

6. Sub-program section: If the program is a multi-function program, then the subprogram section contains all user-defined functions that are called in the main() function.

No related questions found

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...