What is C Language? Calculate Sum of two numbers in C Langauge

Introduction: What is C Language?
In computing C is a general purpose programming language developed by Dennis Ritchie at “AT & T’s Bell Laboratories” of USA in 1972.
This language was created for a specific purpose i.e. to design the UNIX operating system.The Unix operating system and virtually all Unix applications are written in the C language. C has now become a widely used professional language for various reasons which are:
·         Easy to learn
·         Structured language
·         It produces efficient programs.
·         It can handle low-level activities.
·         It can be compiled on a variety of computers.

Some Facts about C Language
·         C was basically invented to write an operating system called UNIX.
·         C language is a successor of B language which was introduced around 1970
·         The language was formalized in 1988 by the American National Standard Institute (ANSI).
·         C is a procedural language.
·         Today C is the most widely used System Programming Language.
·         C language influenced most of the modern world programming languages which include the mighty C++ and Java as well.

Now let’s create a program to calculate sum of two numbers using C language
#include<stdio.h>
#include<conio.h>
void main()
{
  int a,b,sum;
  clrsrc();
  printf("Enter value of a=");
  scanf("%d",&a);
  printf(" Enter value of b=");
  scanf("%d",&b);
  sum=a+b;
  printf("Sum of %d and %d = %d"a,b,sum);
  getch();
}

Run the program using ctrl+F9

Output will be:
Enter value of a= 50
Enter value of b= 30
Sum of 50 and 30 = 80

Now over to you:

"If you like my work; you can appreciate by leaving your comments, hitting Facebook like button, following on Google+, Twitter, Linked in and Pinterest, stumbling my posts on stumble upon and subscribing for receiving free updates directly to your inbox . Stay tuned for more technical updates."
Previous
Next Post »

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily..