Pseudo Code

In this topic, you will learn about, Pseudo Code.

Pseudo Code: It is made up of two words pseudo and code. Pseudo means imitations and code refers to instructions, written in a programming language as its means pseudo code is not a programming code, but its modules and modules look like programming code. it is a generic way of describing an algorithm without using a specific programming related notation.

Simply we can say that it is an outline of a program written in a form that can be easily converted into real programming statements it uses plain English statements rather than symbols to represent the process of a computer program. It is also known as PDL (programming design language) as it emphasizes more on the design aspects of a computer program of structured English because usually its instructions are written in normal English, but not in structured English.

Pseudocode sticks a fine balance between the understandability and information of a natural language like English and the mission of the computer program code.

It is somewhat halfway between English and programming language. If the algorithm is written in English, the description may be at such a high level that may too difficult to analyze the algorithm, and then to transform it into actual code if instantly, the algorithm is written in the code, the programmer has to invest a lot of time in describing the details of the algorithm. Therefore the goal of writing pseudo-code is to provide a high-level description of an algorithm, which fascinates the analyzing the eventual coding, but at the same time suppressing many of the details that are insignificant.

See also  Deadlock Detection and Recovery

Pseudo Code Example:

Calculate the area of the rectangle.

PROMPT    the length of the rectangle

PROMPT    width of the rectangle

COMPUTE area by multiplying length and breadth

DISPLAY   the area


Pseudo Code uses some keywords to denote programming process:

  2. Output: PRINT, DISPLAY or SHOW
  4. Initialize: SET, INITIATE or LET
  5. Add 1: INCREMENT


n etc

Since Pseudocode is detailed get readable, it can be inspected by a team of designers and programmers as a way to ensure that actual programming is likely to match the design specification. It is better to catch errors at the pseudo-code stages rather than correcting them in the later stage. As it would prove expensive.

Once a pseudo code is accepted it is transformed into actual programming code using the vocabulary and syntax of the chosen programming language the benefit of pseudocode is that it enables the programmers to concentrate on the algorithm without worrying about all the systems of the multiple programming languages.

In fact, we can write pseudocode even knowing word programming language will be used for final implementation. Eventually, computer text tools use the pseudo-code in their examples so that all programmers can understand them, even if they do not know some programming languages.

Comment below if you have queries related to the above topic, Pseudocode.