12/11/2015

C language

C language is a high level language. It is developed by Dennis M. Ritchie. C language was first implemented on DEC PD-11 computer.  C language has become a professional language.

Why use C Language ?

It is
  • Easy to learn. 
  • Produce efficient programs.
  • Can be compiled on various computer platforms.

C program

Let's look at our first program.


Line 1:
        #include directive tells the C compiler to include stdio.h file.

Line 2:
          main() is the function, where the program execution start.
 
Line 3:
           Curly Braces { tells the compiler, where the main program start.

Line 4:
            Printf() is a function which print the message contain in parenthesis, 

Line 5:
           Curly Braces } tells the compiler that the main program is now end.

C language basically consist of the following main parts.
  1.  Variable
  2.  Function
  3.  Preprocessor command
  4.  Statements
  5. Comments
 Let's understand one by one.

In this example 
Line 1, show preprocessor command.
Line 2, show the main function.
Line 3, show the comment.
Line 4, show the another function.

You can watch this on video





                                           Click here to next >>

No comments:

Post a Comment

Interfacing LCD With Arduino Microcontroller

In this tutorial we are going to  interface a  Liquid Crystal Display (LCD)  with Arduino Microcontroller .  Liquid Crystal Display are us...