Every C program is basically a group of different section that is used for different purpose. The structure gives us a basic idea of the order of the sections in a program. A well-defined structured layout makes program more readable, easy to modify, consistent format and gives better clarity and the concept of a program. Whenever we write a program in ‘C’ language, we can divide that program into six different sections. These sections are as follows:
- Documentation section
- Linkage section
- User definition section
- Global declaration section
- Main() function section
- Subprogram section
Pictorial Representation of Basic Structure of C Programming:
Figure: Basic Structure of C Program
A program in ‘C’ may not contain all the sections shown above but main() function is a must as the program execution always starts with main() .
Brief explanation of each section is given below:
Documentation Section:
Documentation section is generally description of program. It is only a set of comments for program documentation. Documentation section consist program’s name, objective of the program, author’s name and other useful details like the creation date, title etc that can be referenced later. It provides an overview of the program.
Example
/*
Author: Eliza Begum
Date: 2/2/2022
Description: This program calculate simple interest
*/
Linkage Section:
The linkage section consists of the header files that are used in the program. It provides instruction to the compiler to link function from the system library. If the programmer wants any one of the functions, from any one of the header files, there should be a mechanism to inform the compiler. From the link section, we instruct the compiler to link those header files from the system libraries, which we have declared in the link section in our program.
Example:
#include<stdio.h>
#include<conio.h>
#include<string.h>
User Definition Section:
This section is used to define symbolic constants. Symbolic constants are used for better understanding of certain names that are not going to change throughout the program. Generally capital letter is used to define symbolic constants. The keyword define is used in this part. Macros are used in this section.
Example:
#define PI 3.1415
#define MAX 5
Here, PI, MAX are symbolic constants.
Global Declaration Section:
The global variables that can be used anywhere in the program are declared in global declaration section. Global variables can be used by all the functions. The user-defined functions are also declared in this part. The user defined functions specified the functions specified as per the requirements of the user.
Example:
int sum(int x,int y);
int a;
float b;
Main() Function Section:
The main() function has control over the program. Every C program must have a main function which is the starting point of the program execution. It contains 2 parts, namely, local variable declaration part and Executable statement part and these two parts must be written in between opening and closing braces. Local variable declaration part is used for declaring local variables which are to be used in executable statement part. Executable statement contains all the instructions to be executed.
int main()
{
int a=5; // Declaration Part
printf(“a=%d”,a); /*Execution Part */
return 0;
}
Sub Program Section:
The subprogram section contains all the user defined functions that are used to perform a specific task. All the function subprograms are user defined with an optional list of arguments enclosed in parentheses and generally placed after the main() definition is over. There can be placed in any order.
int sum(int a, int b)
{
return a+b;
}
Great line up. We will be linking to this great article on our site. Keep up the good writing.
What i do not realize is in reality how you are no longer actually a lot more smartly-preferred than you might be now. You are very intelligent. You know thus considerably with regards to this subject, produced me individually consider it from a lot of varied angles. Its like men and women aren’t involved except it’s one thing to do with Girl gaga! Your personal stuffs nice. Always care for it up!
Someone essentially help to make seriously posts I would state. This is the very first time I frequented your website page and thus far? I amazed with the research you made to create this particular publish amazing. Fantastic job!
There is apparently a lot to identify about this. I consider you made certain nice points in features also.
Its superb as your other articles : D, thankyou for posting. “In the spider-web of facts, many a truth is strangled.” by Paul Eldridge.
I like this post, enjoyed this one appreciate it for posting.
Normally I don’t read article on blogs, but I wish to say that this write-up very pressured me to check out and do it! Your writing taste has been surprised me. Thank you, very nice post.
Just wanna comment that you have a very decent internet site, I love the design it really stands out.
An impressive share, I simply given this onto a colleague who was doing a little bit evaluation on this. And he in reality bought me breakfast because I discovered it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to debate this, I really feel strongly about it and love studying extra on this topic. If attainable, as you develop into experience, would you thoughts updating your blog with more details? It is highly useful for me. Huge thumb up for this weblog post!
I really appreciate this post. I¦ve been looking all over for this! Thank goodness I found it on Bing. You’ve made my day! Thx again
Hello there, I found your blog via Google while searching for a related topic, your web site came up, it looks good. I have bookmarked it in my google bookmarks.
I’m really inspired along with your writing skills as well as with the format to your weblog. Is that this a paid subject or did you customize it your self? Either way stay up the excellent high quality writing, it’s rare to peer a nice weblog like this one nowadays..
Super-Duper blog! I am loving it!! Will be back later to read some more. I am taking your feeds also
You made some first rate factors there. I looked on the internet for the problem and located most people will go together with together with your website.
Your place is valueble for me. Thanks!…
I am not really excellent with English but I find this very easygoing to translate.
Thank you for some other informative website. The place else may I get that type of information written in such an ideal method? I’ve a venture that I am just now working on, and I have been at the look out for such information.
I believe this internet site contains very great written subject matter posts.
Hello very nice blog!! Guy .. Excellent .. Amazing .. I’ll bookmark your web site and take the feeds also?KI am glad to search out so many helpful information here in the put up, we want work out more strategies in this regard, thank you for sharing. . . . . .
I don’t usually comment but I gotta tell regards for the post on this special one : D.
I just could not depart your website before suggesting that I really enjoyed the usual info an individual supply on your visitors? Is gonna be back often in order to investigate cross-check new posts.
Real excellent visual appeal on this internet site, I’d value it 10 10.
Hello! I just would like to give a huge thumbs up for the great info you have here on this post. I will be coming back to your blog for more soon.
magnificent publish, very informative. I ponder why the opposite specialists of this sector don’t realize this. You must continue your writing. I am sure, you’ve a great readers’ base already!
Super-Duper blog! I am loving it!! Will be back later to read some more. I am bookmarking your feeds also.
Thank you for any other informative site. The place else may just I get that type of information written in such an ideal manner? I’ve a undertaking that I’m just now operating on, and I have been on the look out for such information.
I have been absent for some time, but now I remember why I used to love this web site. Thanks , I¦ll try and check back more frequently. How frequently you update your web site?
I’ve been surfing online greater than 3 hours lately, but I by no means found any attention-grabbing article like yours. It’s beautiful price sufficient for me. Personally, if all web owners and bloggers made just right content as you did, the web shall be a lot more helpful than ever before.
I do accept as true with all of the ideas you’ve presented to your post. They’re really convincing and will certainly work. Still, the posts are too short for beginners. May you please extend them a little from subsequent time? Thank you for the post.
Fantastic items from you, man. I have have in mind your stuff prior to and you’re just extremely great. I really like what you’ve received right here, really like what you are saying and the way in which wherein you say it. You make it enjoyable and you continue to care for to keep it smart. I cant wait to read far more from you. This is really a terrific site.
It¦s actually a great and helpful piece of info. I¦m satisfied that you simply shared this helpful information with us. Please keep us up to date like this. Thanks for sharing.
I like this website because so much utile material on here : D.
I?¦ve been exploring for a little for any high quality articles or weblog posts on this sort of area . Exploring in Yahoo I eventually stumbled upon this web site. Studying this information So i?¦m happy to show that I’ve an incredibly excellent uncanny feeling I found out just what I needed. I most definitely will make sure to do not put out of your mind this site and give it a glance regularly.
Simply wish to say your article is as surprising. The clarity in your post is just excellent and i can assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please keep up the rewarding work.
Real great info can be found on web site.
I have been exploring for a bit for any high quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this web site. Reading this info So i’m happy to convey that I’ve an incredibly good uncanny feeling I discovered just what I needed. I most certainly will make certain to do not forget this site and give it a glance regularly.
This site is my intake, very fantastic design and style and perfect content material.
Virtually all of the things you point out is supprisingly appropriate and it makes me wonder why I had not looked at this in this light previously. This particular piece truly did turn the light on for me personally as far as this subject goes. However there is actually one factor I am not too comfy with and whilst I make an effort to reconcile that with the actual core theme of the point, allow me see just what the rest of your subscribers have to point out.Nicely done.
I like your writing style really loving this website .
Your style is so unique compared to many other people. Thank you for publishing when you have the opportunity,Guess I will just make this bookmarked.2
You are my breathing in, I possess few web logs and rarely run out from to post .
I am not rattling wonderful with English but I get hold this real easy to translate.
A lot of whatever you mention happens to be astonishingly precise and it makes me ponder the reason why I had not looked at this with this light previously. This particular article truly did switch the light on for me as far as this particular issue goes. But there is one particular issue I am not necessarily too comfortable with and whilst I make an effort to reconcile that with the actual core idea of your point, permit me observe exactly what all the rest of the readers have to point out.Well done.
I am glad to be a visitant of this consummate blog! , regards for this rare information! .
As soon as I discovered this website I went on reddit to share some of the love with them.
I really appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thanks again
Thanks for sharing superb informations. Your website is very cool. I am impressed by the details that you have on this site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched everywhere and simply could not come across. What an ideal web-site.
Some really interesting points you have written.Aided me a lot, just what I was looking for : D.
Real clear site, thanks for this post.
Simply wish to say your article is as astounding. The clearness in your post is just great and i can assume you are an expert on this subject. Fine with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please keep up the rewarding work.
I gotta bookmark this site it seems very beneficial very helpful
Some genuinely interesting points you have written.Aided me a lot, just what I was looking for : D.
It is truly a nice and useful piece of info. I?¦m happy that you shared this useful info with us. Please keep us up to date like this. Thank you for sharing.
I’m impressed, I need to say. Actually rarely do I encounter a weblog that’s each educative and entertaining, and let me let you know, you could have hit the nail on the head. Your thought is excellent; the issue is one thing that not sufficient persons are talking intelligently about. I am very blissful that I stumbled across this in my search for one thing regarding this.
Hiya, I am really glad I’ve found this info. Nowadays bloggers publish only about gossips and web and this is actually annoying. A good web site with exciting content, this is what I need. Thank you for keeping this web-site, I’ll be visiting it. Do you do newsletters? Can not find it.
This is the right blog for anyone who wants to find out about this topic. You realize so much its almost hard to argue with you (not that I actually would want…HaHa). You definitely put a new spin on a topic thats been written about for years. Great stuff, just great!
I am really impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it is rare to see a great blog like this one nowadays..
I think you have remarked some very interesting points, regards for the post.
Very good written story. It will be valuable to anyone who utilizes it, as well as me. Keep up the good work – for sure i will check out more posts.
Hello my friend! I wish to say that this article is awesome, nice written and come with approximately all vital infos. I¦d like to see extra posts like this .
I always was concerned in this topic and still am, thanks for putting up.
I have been browsing online greater than three hours today, but I never found any interesting article like yours. It’s pretty value sufficient for me. Personally, if all site owners and bloggers made excellent content material as you did, the internet might be much more helpful than ever before. “Now I see the secret of the making of the best persons.” by Walt Whitman.
I like this weblog very much so much great information.
Appreciating the dedication you put into your website and detailed information you present. It’s good to come across a blog every once in a while that isn’t the same unwanted rehashed information. Fantastic read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
I love it when people come together and share opinions, great blog, keep it up.
Utterly composed subject material, Really enjoyed reading through.
Very interesting details you have remarked, regards for posting. “I don’t know what you could say about a day in which you have seen four beautiful sunsets.” by John Glenn.
I am often to blogging and i really appreciate your content. The article has really peaks my interest. I am going to bookmark your site and keep checking for new information.
I?¦ve learn a few good stuff here. Definitely price bookmarking for revisiting. I surprise how much attempt you put to make this kind of excellent informative website.
Very interesting subject , regards for putting up.
This web site is really a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely discover it.
Fantastic items from you, man. I’ve take into accout your stuff previous to and you’re just too great. I actually like what you’ve obtained right here, really like what you are saying and the best way during which you assert it. You make it entertaining and you continue to take care of to keep it sensible. I can’t wait to learn much more from you. This is really a great site.
Excellent post. I was checking constantly this blog and I am impressed! Extremely useful information particularly the last part 🙂 I care for such information much. I was seeking this certain information for a long time. Thank you and best of luck.
Very interesting details you have observed, regards for posting.
I’d should examine with you here. Which is not one thing I normally do! I take pleasure in reading a put up that can make individuals think. Also, thanks for permitting me to remark!
Hello.This post was really remarkable, especially because I was searching for thoughts on this matter last Saturday.
I?¦ve read several just right stuff here. Definitely worth bookmarking for revisiting. I wonder how a lot attempt you place to create any such magnificent informative web site.
Wow, awesome weblog format! How lengthy have you been running a blog for? you made blogging look easy. The entire look of your web site is fantastic, as well as the content!
Very interesting info !Perfect just what I was looking for! “If you bungle raising your children, I don’t think whatever else you do matters.” by Jacqueline Lee Bouvier Kennedy Onassis.
Heya i am for the first time here. I came across this board and I find It really useful & it helped me out much. I hope to give something back and aid others like you aided me.
nice…thank you..
I truly prize your piece of work, Great post.
Thank you for your nice comments….
Great post. I was checking constantly this blog and I am impressed! Very useful information specifically the last part 🙂 I care for such information much. I was looking for this particular info for a very long time. Thank you and best of luck.
Just wanna input that you have a very decent internet site, I love the style it actually stands out.
Thank you for sharing with us, I believe this website truly stands out : D.
I have not checked in here for a while as I thought it was getting boring, but the last few posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend 🙂
Thank you for some other excellent post. Where else could anybody get that kind of information in such an ideal means of writing? I have a presentation subsequent week, and I am at the look for such info.
you’re really a good webmaster. The web site loading speed is incredible. It seems that you’re doing any unique trick. Moreover, The contents are masterpiece. you’ve done a fantastic job on this topic!
Some truly nice stuff on this site, I like it.
I simply could not depart your website prior to suggesting that I really loved the usual info an individual provide to your visitors? Is going to be again frequently to inspect new posts.
We are a group of volunteers and starting a new scheme in our community. Your site provided us with useful info to work on. You’ve performed a formidable process and our whole neighborhood will be grateful to you.
I consider something really special in this web site.
Hello my loved one! I wish to say that this post is awesome, great written and include almost all significant infos. I¦d like to look extra posts like this .
I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.
I just could not go away your website before suggesting that I actually loved the usual information an individual supply to your visitors? Is gonna be again often in order to check out new posts
We’re a group of volunteers and opening a new scheme in our community. Your website provided us with valuable info to work on. You’ve done a formidable job and our whole community will be thankful to you.
I’ve been surfing on-line greater than 3 hours today, but I by no means discovered any attention-grabbing article like yours. It¦s pretty worth enough for me. Personally, if all web owners and bloggers made good content material as you did, the net might be much more useful than ever before.
Its great as your other posts : D, regards for posting. “In the spider-web of facts, many a truth is strangled.” by Paul Eldridge.
Hello there, I discovered your blog by means of Google at the same time as looking for a similar topic, your website got here up, it looks great. I’ve bookmarked it in my google bookmarks.
Very interesting points you have mentioned, appreciate it for putting up. “Ignorance, the root and the stem of every evil.” by Plato.
I think other website proprietors should take this website as an model, very clean and excellent user genial style and design, let alone the content. You are an expert in this topic!
I really enjoy studying on this site, it has got excellent posts. “And all the winds go sighing, For sweet things dying.” by Christina Georgina Rossetti.
I have been absent for some time, but now I remember why I used to love this website. Thanks, I will try and check back more frequently. How frequently you update your web site?
Hello.This post was extremely fascinating, especially because I was investigating for thoughts on this issue last Wednesday.
You are a very bright individual!
Admiring the hard work you put into your blog and detailed information you present. It’s great to come across a blog every once in a while that isn’t the same old rehashed material. Excellent read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
I used to be more than happy to seek out this internet-site.I needed to thanks for your time for this wonderful read!! I undoubtedly enjoying each little little bit of it and I’ve you bookmarked to check out new stuff you weblog post.
Valuable information. Lucky me I found your web site by accident, and I’m shocked why this accident didn’t happened earlier! I bookmarked it.
Magnificent goods from you, man. I’ve understand your stuff previous to and you’re just too great. I actually like what you’ve acquired here, certainly like what you’re stating and the way in which you say it. You make it enjoyable and you still care for to keep it wise. I can’t wait to read much more from you. This is actually a wonderful website.
Good write-up, I am normal visitor of one’s website, maintain up the nice operate, and It is going to be a regular visitor for a lengthy time.
Wow! Thank you! I always needed to write on my site something like that. Can I implement a part of your post to my blog?
I got what you intend, thanks for putting up.Woh I am thankful to find this website through google.
It’s really a cool and helpful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thanks for sharing.
Some really nice stuff on this website , I enjoy it.
Very interesting info!Perfect just what I was looking for!
You have noted very interesting details! ps nice site.
I’d constantly want to be update on new content on this web site, saved to bookmarks! .