Pages

Monday, December 16, 2019

About C laguages

About C language 

Introduction :

          C language is a  programming language that is extremely popular,  very simple in use and understanding  and flexible. It is machine-independent, structured programming language which is used in many applications as like written operating system like Unix, core libraries of android are written in C. Major part of web browsers written in C . My SQL is also written in C. C language is popular language for hardware dependent programming.

          C language is a base for the programming. If you know 'C' you can easily able to grasp the concept and  the knowledge of the other programming languages that uses the concept of 'C'. So most of the programmers advice to learn 'C'. 

History :


          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. A great Scientist Dennis Ritchie is known as the founder of the c language.

          In 1960, Programming language 'ALGOL'(Algorithmic Language)is a family of imperative computer programming language. 'ALGOL' was used on a large basis in European countries. 'ALGOL' introduced the concept of structured programming to the developer community

          In 1966, a new computer programming language was introduced called as 'BCPL' which stands for Basic Combined Programming Language. It  was designed and developed by Martin Richards, for written system softwares. In 1969-70 a new programming language called 'B' was introduced by  Ken Thompson that contained many  features of 'BCPL. It can improve and Upgrade the BPCL . This programming language was developed for UNIX operating system at AT & T and Bell Laboratories in USA.  Both the 'BCPL' and 'B' were system programming languages.

          In 1972,  Dennis Ritchie created a new programming language called 'C' at the AT & T  Bell Laboratories. The base of the C' programming language was 'ALGOL' , ' BPCL'  and  'B' languages. 'C' contains all the features of these languages and many more additional concepts that make it unique from other languages.

Benefits  of C : 


  • It is the combination of High level and low level programming language so it can be used for low level programming functioning , It also support some high level Functions.
  • C language consist of rich library which provides a number of built-in functions. 
  • C language is case-sensitive which means lowercase and uppercase letters are treated differently.
  • for learning C++, which is an object oriented language, you need to know the C language very well . if you become a master in  C programming, you can easily learn another specified language.
  • It allow a complex program to be break down into number of sub part called simple program or function. Provide assess to it.

Overview of C :


       C language uses  pre-processor software , compiler, library file, linker for execution of program or for formation of software.  A file with .exe extension is software. 

        C language involve use of identifier , keywords, instruction, Data types, operators, statements, control instruction, functions, arrays, string, pointer, structure, union, enumerators, file opening modes, class, pointer, wild pointer,  void pointer, function pointer , etc..


  • printf ( ) is predefined function used to print expression or value of variable.
  • scanf ( ) is predefined function used to take value from keyboard.
  • gotoxy ( )  is a predefined function used to move cursor at any position on console screen, it contain co-ordinate of position.
  • Operators : 
             1)  Unary Operator : eg. + . - , ++ , -- , size of ().

                 2)  Arithmatic Operator : eg. + , - , % , * , / .

                 3)  Bitwise Operator : eg.   Bitwise NOT (~)
                                                                Bitwise AND (&)
                                                                Bitwise OR (l)
                                                                Bitwise XOR (^)
                                                                Right Shift (>>)
                                                                Left Shift (<<)
                 4)  Relational Operator : eg. < , > , <= , >= , == , != . 

                 5) Logical Operator : eg.    Logical AND (&&)
                                                               Logical OR (ll)
                                                               Logical NOT (!)
                 6)Conditional Operator : eg. ---?---:---

                  7)Assignment Operator : eg. x = , -= , *= , /= , %= , &= , l= , ^= .
  • Control Instruction : 
        1) Decision conrol instruction : eg.
                                                                     if
                                                                     if--else
                                                                 
        2) Iterative control instruction : eg .
                                                                      for loop
                                                                      while loop
                                                                      do-while loop
        3) Switch control instruction

        4) Goto control instruction

  • Function in C :   
                                     1) Take nothing , return nothing

                                                  2) Take something , return nothing
                                                  3) Take nothing , return something
                                                  4) Take something , return something
  • Array :  Linear collection of similar element, group of variable.
  • string : string is the array of characters. Collection of dissimilar element.
                    string related function : 1) String length           :  Strlen ( )
                                                              2) String reverse          : Strrev ( )
                                                              3) String lower             :  Strlwr ( )
                                                              4) String upper             :  Strupr ( )
                                                              5) String copy              :  Strcpy ( )
                                                              6) String Camparision   :  Strcmp ( )
                                                              7) String concatenates  :  Strcat ( )
                                                           

  • pointer : pointer is a variable that contain address of another variable.
  • Structure : Structure is a way to group variables. 
  • Union : Union is similar to structure, except it allow you to define variables that share storage space.
  • Enumerators : Enumerator is a non-primitive data type formation way as struct and union. 
  • file opening mode in c
                                                    1) read ( r )
                                                    2) write ( w )
                                                    3) append ( a )
                                                    4) read + write ( r+ )
                                                    5) read+write ( w+ )
                                                    6) read+append ( a+ )



Application of C :

  • C language is used for creating the computer application.
  • C language is use in writing the operating system which manage the input and output device of computer.
  • Most of the compilers design , Browsers made with C.
  • My SQL is written in C language.
  • Core libraries of android are written in C.

               




       



















No comments:

Post a Comment