Skip to content

Pseudocode Pascal notations

Used in GATE, DAA, proofs

begin ... end

Block boundary (same as { ... } in C)

begin
statement1;
statement2;
end

Equivalent C:

{
statement1;
statement2;
}

:=

Assignment operator (means “store into”)

x := 5;

Equivalent C:

x = 5;

Const

Declares constants (fixed values)

Const dividend = 81;

Means value won’t change.

Declares variables

Var remainder, quotient : integer;

Equivalent C:

int remainder, quotient;

While loop syntax

While (condition) do
begin
...
end;

Equivalent C:

while(condition){
...
}

Comment / Assertion marker (used in proofs)

(* loop invariant here *)

Not executable, only for explanation.