::Computer program


Computer::program    Programs::software    Title::first    Language::computer    System::edition    Machine::memory


<source lang=pascal>

program hello; begin

 writeln('Hello, World!');

end. </source>

Source code of a "Hello, World!" program written in the Pascal programming language.

A computer program is a collection of instructions,<ref name="aup-ch4-p132">{{#invoke:citation/CS1|citation |CitationClass=book }}</ref> performing a specific task when executed by a computer. A computer requires programs to function, and typically executes the program's instructions in a central processing unit.<ref name="osc-ch3-p58">{{#invoke:citation/CS1|citation |CitationClass=book }}</ref>

A computer program is usually written by a computer programmer in a programming language. From the program in its human-readable form of source code, a compiler can derive machine code—a form consisting of instructions that the computer can directly execute. Alternatively, a computer program may be executed with the aid of an interpreter.

A part of a computer program that performs a well-defined task is known as an algorithm. A collection of computer programs, libraries and related data are referred to as software. Computer programs may be categorized along functional lines, such as application software or system software.

Computer program sections
Intro  History  Computer programming  Storage and execution  Functional categories  See also  References  Further reading  

PREVIOUS: IntroNEXT: History