Page Nav

HIDE

Grid

GRID_STYLE

Classic Header

{fbt_classic_header}

Search This Blog

Notes:

latest

02_Overview_C programming

Overview C is one of the oldest and finest programming language developed by Dennis M. Ritchie at AT & T Bell laboratories of the USA in...



Overview


C is one of the oldest and finest programming language developed by Dennis M. Ritchie at AT & T Bell laboratories of the USA in 1970.

It is reliable, simple, easy to use & stands in between high-level language & low-level language. That’s why it is often called a Middle-level language.

Uses

  • Major parts of windows, linux and other OS are written in C.
  • C is used to write driver programs for devices like tablets, printers etc.
  • C language is used to program embedded systems where programs need to run faster in limited memory.
  • C is used to develop games, an area where latency is very important I.e. computer has to react quickly on user input.


Editor

An editor is a specialized word processor used to write source code in a programming language. For e.g. Notepad, Sublime Text, Eclipse, Visual Studio Code, Dev C++ etc. The extension of the file must  ' .c  ' 



Visual Studio Code (CLICK HERE) Sublime Text (CLICK HERE) DEV C++ (CLICK HERE)


Preprocessor

It is a program that removes all comments and modifies source code according to direction supplied in the program. A preprocessor directive begin with '#' and it is an instruction to the program. For e.g. '#include<stdio.h>' instructs the preprocessor to replace the directive with the contents of the file stdio.h


Compiler

As we know that computer only understand binary language i.e. 1 & 0. To run any code or source file; it must be translated into binary numbers. So, the compiler translates the preprocessed source code into binary numbers which is understandable by computer.
If we do any mistake during writing code then the compiler detect that mistake in that source code but the computer will not produce any compiled program. If compiler doesn’t detect any error, then it produces object code which is a machine language of source code with extension of .obj  . The obj stands for an object which denotes a file as an object file (code).


List of C compiler

  • CCS C Compiler
  • Turbo C
  • Minimalist GNU for Windows (MinGW)
  • Portable C Compiler
  • Clang C++
  • Digital Mars C++ Compiler
  • Intel C++
  • IBM C++
  • Visual C++ : Express Edition
  • Oracle C++


Linker

It combines the object code of a program with necessary items (like library files) to form an executable program. The standard input and output functions are contained in a library file stdio.h so even the most basic program will require a library function. After compilation of the program files, the computer must somehow link these separate pieces to form a single executable program. This linking is done by the linker. The executable file will have an extension .exe  .


Executable File

The text editor produce .c source files, compiler converts the .c file to .obj file and linker produces .exe file from .obj file. This file with the extension .exe is known as executable file. We can run this file to show the output.


Download the pdf file



-------------------------------------------------------------------------------------------------------------------------------------------
The End
-------------------------------------------------------------------------------------------------------------------------------------------


No comments

If you have any doubts, Please let me know,

Click here to show more posts