Different Parts of C Program
In this article, I'm gonna discuss the different parts of C Program with an Example. So keep reading this article till the end.
In order to clear all basics of C Programming you can visit my All in one C Programming course.
Explanation of C program with Example C program Example:
(hash)include main() { printf("Welcome to www.dheerajpatidar.com"); return 0; }
Look at the above example, and understand each of part of C program using the all the stuff mentioned below.
First of all have a look at all the parts of C Program in short:
Header File Inclusion Main Function Return Statement Printf() function Scanf() function Different parts of C Program
- Header File Inclusion: As you see in above example, we have #include in first line.
(hash)include: Here in this part of the C Program, #include is the predecessor directive, used to include or import header files like stdio.h, conio.h, string.h, and many more.
stdio.h:
stdio.h is the header file used to enable the standard input output functions. All the Input-output functions have written in this header file.
Not only this file, In order to use more functionalities, there are lots of header files in C like graphic.h header file for using predefined graphics stuff.
- main function The main function of the C Program play very important role. The Execution of any C program starts with the main function.
We can use the other functions of c program by calling them into the main function.
The main function may contain any number of statements. These statements are executed sequentially in the order in which they are written.
In C, the function prototype of the 'main' is one of the following: Read More...
original Credit: www.dheerajpatidar.com
Subscribe to my newsletter
Read articles from Dheeraj Patidar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Dheeraj Patidar
Dheeraj Patidar
In this site I'm presenting the content about digital marketing, online jobs, programming languages, and other technical aspects.