Source code

Well-structured, human-readable text that encodes behavior of a computer / From Wikipedia, the free encyclopedia

Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about Source code?

Summarize this article for a 10 year old


In computing, source code, or simply code, is text (usually plain text) that conforms to a human-readable programming language and specifies the behavior of a computer. A programmer writes code to produce a program that runs on a computer.

Simple C-language source code example, a procedural programming language. The resulting program prints "hello, world" on the computer screen. This first known "Hello world" snippet from the seminal book The C Programming Language originates from Brian Kernighan in the Bell Laboratories in 1974.[1]

Since a computer, at base, only understands machine code, source must be translated in order to be used by the computer and this can be implemented in a variety of ways depending on available technology. Source code can be converted by a compiler or an assembler into machine code that can be directly executed. Alternatively, source code can be processed without conversion to machine code via an interpreter that performs the actions prescribed by the source code via the interpreter's machine code. Other technology (i.e. bytecode) incorporates both mechanisms by converting the source code to an intermediate form that is often not human-readable but also not machine code and an interpreter executes the intermediate form.

Most languages allow for comments. The programmer can add comments to document the source code for themself and for other programmers reading the code. Comments cannot be represented in machine code, and therefore, are ignored by compilers, interpreters and the like.

Often, the source code of application software is not distributed or publicly available since the producer wants to protect their Intellectual property (IP). But, if the source code is available (open source), it can be useful to a user, programmer or a system administrator, any of whom might wish to study or modify the program.

Oops something went wrong: