Difference between revisions of "Source code"
Jump to navigation
Jump to search
HitTheHive (talk | contribs) |
HitTheHive (talk | contribs) (→Example: assembler, linker, compiler) |
||
| Line 2: | Line 2: | ||
== Example == | == Example == | ||
| − | The following is an example of a C program that when compiled and executed prints the words "Hello world" to the screen. A C compiler and linker is necessary to compile the program and turn it into an executable. | + | The following is an example of a C program that when compiled and executed prints the words "Hello world" to the screen. A "C" [[compiler]] and [[linker]] is necessary to compile the program and turn it into an executable. Historically, an assembler is also needed, but newer compilers often integrate the assembler and linker functions together. |
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
| Line 14: | Line 14: | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
| − | |||
== See also == | == See also == | ||
Revision as of 03:11, July 24, 2007
Source code is the statements and declarations, usually in human readable form, the specifies a computer program. Knowledge of programming is usually necessary in order to read and understand source code in a program.
Example
The following is an example of a C program that when compiled and executed prints the words "Hello world" to the screen. A "C" compiler and linker is necessary to compile the program and turn it into an executable. Historically, an assembler is also needed, but newer compilers often integrate the assembler and linker functions together.
/* This is a C language program comment */
#include <stdio.h>
#include <stdlib.h>
main()
{
printf("Hello wolrd.");
}