-->

Learn to code the on-demand coding Languages in an easy way. We help you understand programming concepts and coding Techniques Better.

Tuesday, January 19, 2021

What is C Language | structure of C program

This C tutorial series has been designed for those who want to learn C programming language from Basics and also for Professionals.

What is C Language?

What is C?



    C is a Procedural, Middle-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at AT&T Bell Labs, USA. C was invented to write an operating system called UNIX. C is derived from B Language around the early 1970s.  The UNIX OS was totally written in C. Today C is the most widely used and popular System Programming Language.  By learning C, you will understand basic programming concepts.

    C is a system Programming Language. The term System Programming Language refers to, create the system software/applications. 

    It is commonly known as structural Programming Language. The term structure means, break a program into blocks/parts so that it may be easy to understand and modify.

    C is a Procedural Programming language. Procedure Means Function. The Function is a block of code that will be discussed later.


Why should we learn C Language?

    > Easy to Learn.

    > C programming is considered as the base for other programming languages.

    > We Can Write code quickly.

    > Execution time is Less, compared to other Languages.

    >Easy to Modify and Understand.


Applications :

    >UNIX OS is completely Written in C

    >To Built Databases

    >Text Editors

    >Language Compilers

    >Language Interpreters

Basic Structure of C Program?

      


 
   
Explanation:

    Note: In every Programming Language, the Compiler will start executing the code from the Main Function.

    #include:  Hash include is a Preprocessor, which tells the compiler to include the stdio.h [standard input output  header file].

    void: Void is the data type of function main(). Void doesn't return anything.

  Comments in C:

    //         : Single line comment

    /*....*/ : Multi Line Comment

    > Every block of code is Enclosed with Open and Closed Curley Braces {}.

    > In the above code main function is one block.

   Example 2:


    Explanation:

   In the above example, I have Mentioned the  Data Type of Main() function as int. We must have to write the written statement at the end of the main block. By default 0 is placed. The return 0 tells the compiler that the program execution has completed.


 pre <--- How to Learn C                                           Next Topic --->Data Types

    



No comments:

Post a Comment