Pseudo code is "not a real programming language." In other words, it is designed to "look" like an actual programming language, but this code is usually not compilable by any known compiler, or even if it were, would probably be incompatible with the specific syntax of that compiler.
If you understand logic programming, then you should be able to grasp pseudo code without much difficulty. The advantage of pseudo code is, once written, other developers can translate the algorithm depicted in the pseudo code into actual compiled code.
For example, given a typical "Hello World" example, you might write the following:
Clear the screen
Write "Hello World" to the screen
A C programmer might write:
void main(void) {
clrscr();
printf("Hello World");
}
A shell programmer might write:
clear; echo "Hello World"
A Forth programmer would write:
WIPE "Hello World" .
The point is, each programmer would be able to look at the pseudo code, and be able to translate into a useable form for their specific programming language.
Pseudo code typically covers the following aspects:
Memory: variables, which are used for storing input or calculations. Usually written as "Let Variable = " (a syntax borrowed from BASIC).
Branch Control: Loops, conditional branches.
Subroutines: usually similar to "Function FunctionName (Parameter1, Parameter2)". Typically will be called using "CALL FunctionName(x, y)".
Math Operations: addition, subtraction, multiplication, division, and others. Usually written as the form a programmer would use: "Let Total = SubTotal + SalesTax."
Almost all programming eventually boils down to these basic concepts, called "logic programming", and once you understand the fundamentals, you can apply this knowledge to learn any number of programming languages with relative ease.
Pseudo code cannot be processed by a machine, it is solely intended for processing by humans.
Writing in pseudo code means writing in a natural language, not in any specific programming language, so there is no thing as "pseudo-code used in C" as opposed to "pseudo-code used in Java".When you write in pseudo-code, you don't have to follow any specific syntactic rules, just to describe the steps you will use in your algorithm.For example, pseudo-code for bubble sort (taken from wikipedia):procedure bubbleSort( A : list of sortable items ) do swapped = false for each i in 1 tolength(A) - 1 inclusive do: if A[i-1] > A[i] then swap( A[i-1], A[i] ) swapped = true end ifend for while swapped end procedureIt is not written in any programming language, but it should be easy to implement this in any language after you understand the idea from the pseudo-code.
I really don't understand you.....
It doesn't. Pseudo code isn't a programming language, it is just there to give an idea of how you could write a program.
Pseudo-code is not real code insofar as there is no standard and no compilers or interpreters that can reliably convert pseudo-code into machine code. It is a free-form language used for illustrative purposes only. Pseudo-code is typically used to express algorithms using a program-like language that can be easily adapted to any specific language. The choice of wording is entirely up to the author but must be used consistently and in an easy-to-understand manner, using concepts that are common across all languages including structured loops, control statements and functions. Anyone with any programming experience should be able to easily convert pseudo-code into real code without any major difficulty.
what's the difference between flow chart and structure diagrams and pseudo code
No. There is no "right way" and "wrong way" of writing pseudo code, let alone qualifying with "absolute". However, a pseudo code is "wrong" if it cannot be understood, or it is incorrect in semantic (what the code tries to describe, solve, etc)
Pseudo code does not have key words, you make it up, that's why it is pseudo.
pseudo code algorithm to create a linked list
You are going about this backwards. First, define the program. Second, describe its algorithm. Third, if needed, write pseudo code. (Sometime, algorithm and pseudo code is the same process.) Fourth, or third, write real code.
Source code is a sequence of executable instructions written in a particular language. Pseudo code is a sequence of non-executable instructions. It is also called algorithm written in plain English
Pseudo city codes are 3 or 4 charachters long