Introduction to C Programming Language

11 Shares

C is the mother of every modern programming language; we get a test of high level as well as law level programming language in C. It is developed by Denis Ritchie at Bell Laboratory. It developed for developing the operating system which is known as UNIX. The programmed can be defined as a set of instruction, which should be defined in a sequence.

C programming language follows the concept of compiler to compile the code. Compilation is needed to change the format of code in machine compatible format. It is generally known as machine language.

NOTE: – All though to translate a code in machine language we get interpreter. The interpreter will interpret the code line by line. Where the compiler is will compile the code after scanning the entire code

C program

C Language

 

The main point of program in C is:-

  1. Every program must have a main function and it must be only one.
  2. Every statement must be terminated by a semi column.
  3. C is a free form line programming language.
  4. C is a case sensitive programming language.
  5. We save the file with any primary name but the extensions must be c. As for example we can save the above file as first.c. This file is known as source file.
  6. Before the execution, the file must be compiled. The compiler will compile the file from top to Bottom. After successful compilation we get object file. The extension of object file is first.obj. first.c – User first.obj – Compiler
  7. The compiler is responsible for syntax error. Syntax means, the grammar of the programming language.
  8. After compilation linker will come in the picture. The linker will link the code which is used in our program. After successful linking we get executable file. The extension of executable file is
  9. After getting the exe file we execute the file. The program will be executed from main function. Main () is considered as the entry point of the program. To see the output we have To press Alt+F5.
  10.  Every function must have functionality. The functionality will be written inside a pair of curly braces.
  11. The functionality should be written in a sequence. Write a program to print your Name and address: 

     

    Program: –

    # include <stdio.h>

    int main ()

    {

    print (“Name and Address”);

    return 0;

    }

    1. The return types indicate the data type of the value which will be return by the function to its caller.

    NOTE: – The main function is the entry point of the program, hence they should not write void as the return type according to ANSI standard. Program: –

    # include <stdio.h >

    int main ()

    {

    printf (“Ganesh Kumar”);

    printf (“MCA 1st sem. Student”);

    return 0;

    }

11 Shares

Leave a Reply