Introduction to C Programming
May 2, 2020Introduction
C Programming language was developed in 1972, by Dennis Ritchie at Bell Laboratories of AT and T, located in the U.S.A. It was developed to overcome the problems of previous languages such as ALGOL, B, BCPL, etc. It inherits many features of B and BCPL. Initially, C was developed to write UNIX operating system. The current C language has been evolved from different versions of C. In 1989 C was formalised by the American National Standard Institute(ANSI) which is known as ANSI C or C89. Later, in 1990 it was approved by International Standard Organisation. C has taken a series of versioning to add features and to be compatible. The current latest versioning of C is C11, introduced in 2011.
Importance
- Rich set of built-in functions and operators can be used to write any complex program.
- Programs written in C are very fast and efficient. This is due to a variety of data types and built-in functions available.
- Concise and powerful 32 keywords.
- Programs written in C are highly portable. That means programs written in one machine/computer can be run into another with little or no modification.
- C being structured programming language, helps the programmer to think of problems in terms of functions modules and blocks.
C is a high-level structured programming language that can be understood by humans. To run programs written in C in machine/computers, it first needs to be converted to machine code( binary figures that can understand by machines). It involves some steps to convert the high-level language into a machine-readable code.
C is mainly used to write system-level software such as operating systems, embedded system software, network operating systems, etc. C can also be used to write application-level software(games, application software for daily use, text editors) that runs on top of system-level software.
Some Terms
Program
A series of predefined instructions that can be executed by a computer. A computer program can be written using a programming language(for example, C programming language).
High-level programming language
Programs written in high-level can be understood by Humans.
Low-level programming language
Programs written in low-level language can not be understood by humans.
Assembly-level programming language
It is a low-level programming language, that is specific to a particular programmable device such as computers. Programs written in assembly language are converted to machine-readable executables by an assembler.
Compiler
It is a special kind of software that converts programs written in a high-level language to machine codes/object codes.
Linker
It is a computer program/software that takes one or more object files generated by a compiler or an assembler and combines them into a single executable file, object file or library file.
Interpreter
It is a computer program that directly executes/runs the high-level programs without requiring them to be compiled before execution. Unlike compile type programming language interpreted type programming language does not require compilation before program run. Javascript, BASIC, LISP, are interpreted type programming languages.
Source Code
It is a raw program written in a high-level programming language.
Machine Code
The code that is in a machine-readable format/ binary format is called machine/object code. The compiler converts source code into machine code.
Compilation Process
A process of converting high-level source codes to object files.
Debugging
Debugging is the process of finding and resolving the defects or problems within a computer program.