SHORT INTRODUCTION OF C

INTRODUCTION  OF C


                C   seems a strength name for a programming language.  It is a very popular language of computer era. C was an offspring of the BCPL (Basic Combined Programming language) called B. The B language was modified by Dennis Ritchie implemented at Bell laboratories in 1972. The new language was named C. It was developed along with UNIX operating system. This operating system was also developed at Bell laboratories was coded almost entirely in C. For many years c was used in academic environments but eventually with C compiler for commercial use and increase popularity of UNIX. It begain to get wide spread support among computer professionals. Today C is running under a number of operating system including MS DOS and other operating system.
         
                C is a very popular language use the increasing popularity of C is probably qualities. It is a robust language where rich set of built in function and operators can be use to write any complex program.
The C compiler  combine the capabilities of the assembly language with the features of high level language and therefore it is well suited for writing both system and business package.
              The programs written in C are efficient and fast. This is due to its variety of data types and powerful operators. There are 32 keywords and its strength lies in its build in functions. Several standard functions are available which can be use for developing environment. The C language is highly portable this means that C programming can be run on another with little or no modification.

                The C language is well suited for structure programming. So requiring the users to think of a problem in terms of a functions, module or block.

        A paper collection of these modules would make a complete program. This modular structure makes program debugging, testing and maintainance easier. The another features of C is recursion. Here many functions called itself at the time of definition. Another important feature of C is its ability to extend itself. A C program is basically a function that are supported by the C library. We can continuously add our own functions to the C library with the availability of a large number of function. The programming task becomes easy in C language.
A simple program of C:-
#include<stdio.h> // include header file
#include<conio.h>
Void main ()         // describe the body part
{
Int a,b,c=0        // declaration of variable
 Clrscr ()           // remove previous message from screen
Printf(“\n enter two no”);  // show the message for first         input
Scanf(“%d”,&a);  // store value in variable
C=a+b;   // perform arithmetic calculation and assign value in variable
Printf(“\n result=%d”, C); // show the result
Getch();
}        // end of the body part.

Basic Structure Of c Program

                         Documentation Section
                                  Link section
        Definition section / Control declaration section
                             Main ( ) section
          {
                      Declaration part

                      Executable part
          }
                    Sub program section

   Function 1
   Function 2
                  User  define function

Constant Variable And Data type
A programming language is design to help process certain types of data consisting of predefine function, number of character and strings and to provide useful output known as information. The task of processing data accomplished by executing a sequence of precise instruction are found using certain symbol and words according to some rigid rules known as syntax. Every program instruction must confirm precisely to the syntax rule of the language. In C programming we also found some basic elements and syntax rule.

Character Set
 The characters that can be use to form words, numbers and expression depend upon the computer within the program run.

Alphabet :-  A to Z
                 :-  a to z
Digits       :- 0 to 9
Special characters :- @,#,+,-

Keywords
Inside of C programming there are certain words that are  for doing specific task, they are known as keywords and  they have standard predefine meaning in C language. They are always written in lower case and its meaning cannot be change in C language. We found 32 keywords.


Datatype   Control       Class            Other
Integer         If       Auto          Type def
Character       Else      Extern             Size of
Float        Do     Register   Return
Double        While     Volatile     Goto
Long      For     Constant
Short   Switch
Sign            Case
Unsign   Default
Static    Break
Struct  Continue
Union
Enum
Void


HISTORY OF C LANGUAGE


History of C language is interesting to know. Here we are going to discuss a brief history of the c language.
C programming language was developed in 1972 by Dennis Ritchie at bell laboratories of AT&T (American Telephone & Telegraph), located in the U.S.A.
Dennis Ritchie is known as the founder of the c language.
It was developed to overcome the problems of previous languages such as B, BCPL, etc.
Initially, C language was developed to be used in UNIX operating system. It inherits many features of previous languages such as B and BCPL.
Let's see the programming languages that were developed before C language.
LanguageYearDeveloped By
Algol1960International Group
BCPL1967Martin Richard
B1970Ken Thompson
Traditional C1972Dennis Ritchie
K & R C1978Kernighan & Dennis Ritchie
ANSI C1989ANSI Committee
ANSI/ISO C1990ISO Committee
C991999Standardization Committee




Features of C language

  • It is a robust language with rich set of built-in functions and operators that can be used to write any complex program.
  • The C compiler combines the capabilities of an assembly language with features of a high-level language.
  • Programs Written in C are efficient and fast. This is due to its variety of data type and powerful operators.
  • It is many time faster than BASIC.
  • C is highly portable this means that programs once written can be run on another machines with little or no modification.
  • Another important feature of C program, is its ability to extend itself.
  • A C program is basically a collection of functions that are supported by C library. We can also create our own function and add it to C library.
  • C language is the most widely used language in operating systems and embedded system development today.
features of C language

C Language is an amazing language when it comes to simplicity of syntax with decent functionality. It is a perfect mix of both, which makes it the best contender to be taught to students who have just started learning coding, to introduce them into the programming world.

First C Program and its Structure

Lets see how to write a simple and most basic C program:
#include <stdio.h>
int main()
{
 printf("Hello,World");  //single line comment
 return 0;
/*
    multi
    line
    comments
/*
}
OUTPUT OF THE ABOVE PROGRAM
Hello,World
https://darkwriter17.blogspot.com/2019/10/short-introduction-of-c.html




READ MORE BLOGS ON:- https://darkwriter17.blogspot.com

Comments

Post a Comment

Popular posts from this blog

DATABASE ::: TREE TRAVERSAL

Simple Degin Using HTML And CSS Part-2