What is Pseudocode?

A way of writing an algorithm's steps that does not depend on any particular programming language. Part B of Japan's Fundamental Information Technology Engineer Examination presents programs in a pseudo-language that defines type declarations, assignment with ←, control structures such as if, while and for, and array indices that start at 1.

Japanese name: 擬似言語

Pseudocode appears in 1 practice question across 1 topic, including Programming Basics (Pseudocode Tracing).

Field: Programming Basics (Pseudocode Tracing)

Use in Part B of the Fundamental IT Engineer Examination

Since April 2023, the program-reading questions of the Fundamental Information Technology Engineer Examination (Part B) have all used the pseudo-language, and the earlier questions in C, Java, Python, assembly language and spreadsheets, which candidates used to choose from, have been dropped. For example, "integer: x ← 0" declares a variable and assigns its initial value, and "for (i from 1 to n step 1) … endfor" repeats. Arrays are written like {1, 2, 3}, and their indices start at 1. The format tests whether candidates can follow an algorithm's steps without knowing the detailed grammar of a particular language.

Points to watch when reading

As in most programming languages, ×, ÷ and mod are evaluated before + and −, comparisons before and, and and before or. Conventions that affect the result, such as how the fractional part of ÷ is handled and whether and and or evaluate their right side, are stated in the question, so always check them. Array indices starting at 1 are another common pitfall for people used to languages that start at 0.

Correspondence with real programming languages

The pseudocode "x ← y" corresponds to "x = y" in C or Python, the comparison "=" to "==", and "≠" to "!=". "for (i from 1 to n step 1)" corresponds to "for (i = 1; i <= n; i++)" in C. When rewriting steps worked out in pseudocode in a real language, watch where array indices start and how integer division behaves.

FAQ

Can pseudocode programs be run?

Pseudocode is meant for people to read, so there is no standard implementation that runs it. Tools that interpret a pseudo-language are sometimes made for learning, but the basic way to check behavior is to trace the variable values on paper.

How does it differ from a flowchart?

A flowchart shows the flow of processing with symbols and arrows, while pseudocode expresses it in a form close to text. Pseudocode makes detailed steps easy to write and easy to rewrite as a real program.

Pseudocode in the explanations

Questions that mention Pseudocode (1)

  1. The two assignments in the following program were meant to swap the values of x and y. What are the values of x and y after it runs?

Books on Programming Basics (Pseudocode Tracing) Ad

As an Amazon Associate I earn from qualifying purchases.

Semiconductor, Electronics and Computing Calculators

Related terms

Variable Argument Array Bitwise operation Control structure Integer division Modulo operation Object-oriented programming Off-by-one error Return value

Back to the glossary