Source code: Difference between revisions
MathXplore (talk | changes) Restored revision 8322816 by Operator873 (Restorer) Tag: Undo |
remove sentence that is not clear or necessary |
||
| Line 2: | Line 2: | ||
In computer programming, '''source code''' is (generally speaking) a [[text file]] version of a [[computer program]] or [[computer software|software]] that contains instructions that the computer follows to do something. Source code is written in a [[programming language]] which a human can read and change. A large program may contain many different source code files that all work together. Source code is in many cases '''[[compile]]d''' before running it. That means translating the code into [[assembly language]] or [[machine language]] which is much faster and easier for the computer to read, but hard for a human to read. Another very common way is to '''[[interpreter (computing)|interpret]]''' the code, without needing a compilation step, while that's generally slower. |
In computer programming, '''source code''' is (generally speaking) a [[text file]] version of a [[computer program]] or [[computer software|software]] that contains instructions that the computer follows to do something. Source code is written in a [[programming language]] which a human can read and change. A large program may contain many different source code files that all work together. Source code is in many cases '''[[compile]]d''' before running it. That means translating the code into [[assembly language]] or [[machine language]] which is much faster and easier for the computer to read, but hard for a human to read. Another very common way is to '''[[interpreter (computing)|interpret]]''' the code, without needing a compilation step, while that's generally slower. |
||
A computer program may be [[open source]], which means the source code is shared with anyone who wants to look at it and change it. Many programs are however [[closed source]], which means only the [[executable]] code is distributed and people are not allowed to look at and change the code |
A computer program may be [[open source]], which means the source code is shared with anyone who wants to look at it and change it. Many programs are however [[closed source]], which means only the [[executable]] code is distributed and people are not allowed to look at and change the code. |
||
== Example of C source code == |
== Example of C source code == |
||
Latest revision as of 14:48, 29 June 2026
This article does not have any sources. (August 2009) |
In computer programming, source code is (generally speaking) a text file version of a computer program or software that contains instructions that the computer follows to do something. Source code is written in a programming language which a human can read and change. A large program may contain many different source code files that all work together. Source code is in many cases compiled before running it. That means translating the code into assembly language or machine language which is much faster and easier for the computer to read, but hard for a human to read. Another very common way is to interpret the code, without needing a compilation step, while that's generally slower.
A computer program may be open source, which means the source code is shared with anyone who wants to look at it and change it. Many programs are however closed source, which means only the executable code is distributed and people are not allowed to look at and change the code.
Example of C source code
[change | change source]#include <stdio.h>
int main()
{
printf("Hello world!\n");
return(0);
}
When compiled by a C compiler and executed, this will print "Hello world!" on the computer screen and then finish.