Define Program, Programming, Programming Language

Program is a set of instructions given to a computer to solve a particular problem.

The task of developing a program is known as programming.

The software in which we are writing a program is known as a programming language.

A program in C Language can be composed of:

  • Variables Represents a named in memory block that can store values for the program.
  • Literals Represents constant value.
  • Operators are the symbols that define how the operands will be processed.
  • Keywords are the reserved words that have a special meaning.
C Basics

Generation's of Programming Languages

The language that understands by the computer is machine language, which is made up of 0 and 1. So to communicate with the computer, programming language is used. A program is written in any language that is converted into machine language and then executed by the computer.

Programming Languages are classified into different categories:

  1. First generation language / Lowest Level Language / Machine Language.
  2. Second Generation Language / Low Level Language / Assembly Language.
  3. Third Generation Language / High Level Language.
  4. Fourth Generation Language / Very High-Level Language.
  5. Fifth Generation Language / Nearly Natural Language.

First Generation Language (1GL)

Machine Language is a language that is directly understandable by processor without any translation. Programs written in this language consist of machine instructions and appear same as would appear in a computer's memory. Machine language consists of a string of binary numbers (0, 1). Bit 1 means presence of signal, and 0 means absence of signal.

Advantages of First-Generation Language:

  1. Machine language instructions are directly executed, as there is no compilation or translation procedure involved. Hence, Computational speed is very fast.
  2. Machine language makes efficient use of computers memory space.
  3. This language is suitable for computers having limited memory.

Disadvantages of First-Generation Language:

  1. Machine language is a machine dependent language.
  2. Instructions of this language are written in binary language. Since it is very difficult to remember the codes, this leads to errors.
  3. During modification, the address of all instructions has to be changed. As modification requires the address to be changed, it becomes a difficult task.
  4. High programming skill is required to write code in machine language.
  5. Remembering the address of all the storage locations is very difficult task.
  6. Development of a program in machine language is very time-consuming.
  7. Error correction is a very difficult task.

Second Generation Language (2GL)

In 1950, in order to help the programmer, to reduce the programmer's burden, Assembler were developed. Assembler converts the program into a Low-Level Language.

Advantages of Second-Generation Language:

  1. Assembly language programs are easier to use than machine language, as operation codes are replaced by symbols, which are easier to remember.
  2. As the assembly language programs are not directly executed, they require transmission process, so error detection is quite possible.
  3. Modification is quite simple with assembly language program.
  4. Fewer efforts are involved in writing the program.
  5. Assembly language program are modular in nature.

Disadvantages of Second-Generation Language

  1. These languages are totally machine dependent language.
  2. High programming skill is required to develop an assembly language program.
  3. Coding in Assembly language is still time-consuming.
  4. Execution of the program takes more time as it has to be converted into machine language.

Third Generation Language (3GL)

In this generation high level language was introduced, it is easy to work because it uses simple English instruction. High level languages are most powerful and more oriented towards the problem, it takes less time to execute the code. The program written in this generation, is converted into machine language with the help of a compiler. Examples of High-level language are C, FORTRAN, COBOL, Pascal etc.

Advantages of Third Generation Language:

  1. It is most commonly used and are easier to learn.
  2. It is very easy to write the source program as the syntax of these languages are quite similar to other languages
  3. The Programmer does not have to remember the memory address.
  4. Less instruction is given to the machines as compared to the other languages.
  5. Easy to maintain and debug.
  6. High level language is machine independent.
  7. Developing a program in high level language takes less time than low level language.
  8. HLL are procedure-oriented languages and it is user-friendly.

Disadvantages of Third Generation Language:

  1. Programs are less efficient as they take more execution time.
  2. Compiler occupies more memory to translate the program.

Fourth Generation Languages (4GL):

The fourth-generation language is also called a non – procedural language. It enables users to access the database. Examples: SQL, Foxpro etc. Also, in this generation, languages are further improved in productivity, power and robustness. These languages are programmer's friendly.

Advantages of Fourth Generation Language:

  1. Easy to understand & learn.
  2. Less time is required for application creation.
  3. It is less prone to errors.

Disadvantages of Fourth Generation Language:

  1. Memory consumption is high.
  2. Has poor control over Hardware.
  3. Less flexible.

Fifth Generation Languages (5GL):

Fifth Generation Languages is based on the concept of Aritifical Intelligence (AI) technology. Examples of 5GL are PROLOG (programming in logic) and LISP (List processing).

Advantages of Fifth Generation Language:

  1. Machines can make decisions.
  2. Programmer effort reduces to solve a problem.
  3. Easier than 3GL or 4GL to learn and use.

Disadvantages of Fifth Generation Language:

  1. Complex and long code.
  2. More resources are required and they are expensive too.