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

Certification in Full Stack Web Development

#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!

Recommended Videos

Course Schedule

Name Date
Python Course 2021-06-26 2021-06-27
(Sat-Sun) Weekend batch
View Details
Python Course 2021-07-03 2021-07-04
(Sat-Sun) Weekend batch
View Details
Python Course 2021-07-10 2021-07-11
(Sat-Sun) Weekend batch
View Details

Leave a Reply

Your email address will not be published. Required fields are marked *