Source code Example of C source code | Navigation menuadding to it
Software
text filecomputer programsoftwareprogramming languageassembly languagemachine languageopen sourceclosed sourceexecutableC compilerHello world!
Source code
Jump to navigation
Jump to search
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. These days most source code is compiled when it is finished. This translates 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.
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. Most are closed source, which means the executable code is distributed and only the people who made the program can look at and change the code.
Example of C source code |
#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.
Category:
- Software
(RLQ=window.RLQ||[]).push(function()mw.config.set("wgPageParseReport":"limitreport":"cputime":"0.064","walltime":"0.266","ppvisitednodes":"value":99,"limit":1000000,"ppgeneratednodes":"value":0,"limit":1500000,"postexpandincludesize":"value":2770,"limit":2097152,"templateargumentsize":"value":85,"limit":2097152,"expansiondepth":"value":5,"limit":40,"expensivefunctioncount":"value":1,"limit":500,"unstrip-depth":"value":0,"limit":20,"unstrip-size":"value":650,"limit":5000000,"entityaccesscount":"value":0,"limit":400,"timingprofile":["100.00% 231.869 1 -total"," 21.25% 49.267 1 Template:Unsourced"," 19.45% 45.098 1 Template:Ambox"," 2.47% 5.718 1 Template:Tech-stub"," 1.34% 3.114 1 Template:Stub-template"],"scribunto":"limitreport-timeusage":"value":"0.017","limit":"10.000","limitreport-memusage":"value":780158,"limit":52428800,"cachereport":"origin":"mw1273","timestamp":"20190514085459","ttl":2592000,"transientcontent":false););"@context":"https://schema.org","@type":"Article","name":"Source code","url":"https://simple.wikipedia.org/wiki/Source_code","sameAs":"http://www.wikidata.org/entity/Q128751","mainEntity":"http://www.wikidata.org/entity/Q128751","author":"@type":"Organization","name":"Contributors to Wikimedia projects","publisher":"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":"@type":"ImageObject","url":"https://www.wikimedia.org/static/images/wmf-hor-googpub.png","datePublished":"2008-01-29T20:53:49Z","dateModified":"2018-09-05T18:37:21Z","headline":"collection of computer instructions written using some human-readable computer language"(RLQ=window.RLQ||[]).push(function()mw.config.set("wgBackendResponseTime":125,"wgHostname":"mw1266"););