First C Program
A C program basically consists of the following parts:
- Preprocessor Commands
- Functions
- Data types
- Variables
- Statements & Expressions
- Comments
Watch this C Programming & Data Structure by Intellipaat:
Hello Program in C
Open C console and write the following code:
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
printf("Hello C ");
getch();
}
Now click on the compile menu to compile the program. And then click on the run menu to run the c program.
Output:-
Hello C

#include <stdio.h> – It is used to include the standard input output library functions. The printf() function is defined in stdio.h .
#include <conio.h> – It is used to include the console input output library functions. The getch() function is defined in conio.h file.
void main() – The main() function is the entry point of every program in c language. The void keyword indicates that it returns no value.
clrscr() – This function is used to clear the previous output from the console.
printf() – The printf() function is used to print data which is specified in the brackets on the console.
getch() – This function requests for a single character. Until you press any key it blocks the screen.
If you want to know about Keywords and Comments in C, refer to our C programs blog!