The first program in C

To write a program in c programming, we will need code editor which may be code block, dev c++, or another code editor.
as you download code editor one of them or another, install that properly on your system.

first of all, start the code editor and write a given program on that.

Structure of a C program

  • Header files
  • Main function

int main(){
        printf("Hello, welcome to c programming.");
return 0;

Header file

The header file has extension .h which contains all the functions and macros which can be shared with other source files.
some basic header files are stdio.h and conio.h


acronym for standard input out header file which contains some basic functions printf() and scanf() functions.


printf() function is used to display output.


scanf() function is used to get input from the keyboard by users.



This header file stands for console input-output which contains two basic functions getch(), clrscr(), and others.


Basically used in the turbo c compiler, which is used to hold the output screen.


This function is used to clear the output screen.

Note: whenever you write a c program make sure to save the file with the extension .c

Post written by: Hemant Singh
© 2020 - 2020 All rights are reserved