C programming beginner

Introduction

 C Language was originally developed at Bell Labs by Ken Thompson and Dennis Ritchie in the mid of 1970‟s. It is one of the most popular procedural, general purpose, and high-level programming language used in all operating systems of today. Although C was designed for writing system software, it is also widely used for developing application software. C is one of the most popular programming languages of all time and there are very few computer architectures for which a C compiler does not exist.


 C has greatly influenced many other popular programming languages, most notably C++, which began as an extension to C. It supports the programmer with a rich set of built-in functions and operators. C supports different types of statements like sequential, selection, looping etc.

 Procedural programming concept is well supported in C, this helps in dividing the programs into function modules or code blocks. 


Example 1:

#include<stdio.h>
#include<conio.h>
int main()
{
printf("hello world");
getch();
}
Output
hello world 


Example 2:
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c;
printf("enter first number and second number:");
scanf("%d",&a);
scanf("%d",&b);
c=a+b;
printf("the sum is %d",c);
getch();
}

Output:enter first number and second number:
3
4
the sum is 7

Other C Programming:





No comments

Powered by Blogger.