Sunday, 19 November 2017

introduction to c programming

Programming c is the most popular and old programming language.before learning c programming we should have introduction to c programming. we are going to see little introduction to c. C programming language was developed by the Dennis Ritchie on a DEC PDP-11 that used the UNIX operating system. C was developed in 1970 before that the programming language BCPL and B languages are there. These both programming languages led to develop c.

         C programming language is a portable language. Portable means the its program can be execute on multiple platforms.

 Means the program developed on one operating system can be run on another different operating system. It is a portable language so we can port it on any platform without any errors.

 C programming language is a structured oriented programming language. It is not strictly typed language. You can write code in one line also. There is no restriction that how to design code structure. You can write as you wish.

C programming language before mostly used for the systems programming by the programmers. But later it is become a popular language so that it is used for application programs also.

How c Programs executes?

C program à c compiler  à machine code.

C is compiled programming language. Means its code is compiled and then converted to the machine language. Generally programming languages are of two types either compiled or interpreted. 

In compiled language whole code is compiled at once. And in interpreted languages code interpreted line by line. In compiled languages program executes faster than interpreted languages. 

Compilers convert the code into the machine code or binary code which has in form of 0 and 1. This machine or binary code can be directly executed by the machines.

Keywords in c

Keyword is a special word that has a special meaning. In programming c there is  32 keywords. 

These keywords have special meanings that are used for different purposes some are used to declare data types some can use to declare functions etc. Following are the keywords of c.

 auto    double     int           struct    break     else        long      switch    case

 enum     register    typedef    char      extern    return   union      const  

  float      short    unsigned    continue   for   signed   void   default   goto

 sizeof     volatile   do   if   static    while.

Rules for keywords

 Keywords having some rules to use it. Following are the two rules of keywords

-         Keywords are case sensitive. All keywords are in lower case letters only.

-         We can’t use a keyword as a variable name, constant name, function name etc.

In the next post we will learn about how code is written and what process of execution of c programs is.

                                                                                                                                  Next Post


Share This
Previous Post
Next Post

Admin and author of BestBCANotes. Complted master degree in Computer Science.