website logo

What is C programming Language

C programming language is a well structured and procedural programming language. C language was developed by dennis ritchie at Bell laboratories in 1970. this is mainly used to write sets of instruction that executed by system and provides us a specified result as a output. C language is highly portable means we write program in one system and run anywhere or any system.

C program mainly devided into one or more modules called function. every c program consist atleast one function called main. C program execution starts from main function and as per program call other user defined function.

c program execution flow digram

How to write program in C language

We know that every C programs execution start from main function so we must write main function
prototype of main function
main()
{
/* Execution code */
}

Hello world program in C language

#include<stdio.h>
#include<conio.h>
main()
{
printf("Hello World");
}

Example: How to Add two numbers in c

#include<stdio.h>
#include<conio.h>
main()
{
int num1,num2,result;
scanf("%d %d",&num1, num2);
result=num1+num2;
printf("Result= %d\n", result);
}

how to add two number in c programming