What is C ?

C is a programming language which was developed in the year 1972 by Dennis Ritchie.

C is considered to be a low level programming language. Low level programming language is nothing but that provides no abstraction of programming concepts .C is considered as a low level language because they have no automatic memory management .But, I would classify C as an intermediate language because we don’t write machine codes in C .


Working of C :-


  1. First we write a code and save it using filename.c

  2. Compiles the source code.

                      a. We use compiler to convert the source code into object file 

(filename.o or filename.obj) which will be convenient for machine to read i.e, machine

readable 

  1. Linking the object files 

           a. After compiler has converted into a object file it will use linker to combine different

object files and make it be a single file which will be executable file (filename.exe )

and will run the program.





Know about some of the header files used in C :-


C -Header Files

Description

<assert.h>

It will have assert functions

<ctype.h>

It will have character type functions

<locale.h>

It will have localization functions

<math.h>

It will have mathematical functions

<setjmp.h>

It will have jump functions

<signal.h>

It will have signal functions

<stdarg.h>

It will have variable arguments functions

<stdio.h>

It will have input/output functions

<stdlib.h>

It will have standard utility functions

<string.h>

It will have string functions

<time.h>

It will have date time functions

Let’s look at a simple program in C :-


#include <stdio.h>      


int main()

{

    printf("Welcome to code house of C ");


    return 0;

}


Algorithm :-


  1. Start 

  2. Include the header file  #include<stdio.h> 

      Explanation:-  This header file will have standard input and output function .

For Example:- The header file has printf function .

  1. Declare a main function int main()

      Explanation:-  This function is mandatory whenever you write a code in C. The block will directly get into the main function 

  1. Here you can just display a text message called Welcome to code house of C

  2. .For this you can use printf function.

      Explanation:- Since, we are displaying a text it’s called string and we have to use (" ") to write the text and display it using printf function 

                   5. Since, we are using int main() 

                         Explanation:-   It has return type and we have to return 0 since it does not need to return anything        

                    6. Stop

  


           Screenshot:-

1.Code Screenshot:-

         


                                2.Output Screenshot:-