Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and, as of 20 April 2021 (Eastern Time), the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
7 Answers
- BigELv 71 month agoFavourite answer
It is the text of a program. Some (interpreters) are directly runable. For instance, in bash this prints "hello world":
#!/bin/bash
echo "hello world"
And you can run it and both view it. That is considered rudimentary source code.
Now compiled programs, you don't need the actual text. It can be compiled and the compiled binary can be run.
So source in C to the same thing, print out hello world, the source hello.c:
main()
{
printf ("hello world\n");
}
To compile it, "cc -o hello hello.c"
Once compiled using a C compiler, you don't need the source file "hello.c" to run it. You can run it by the created binary file "hello".
Hello is a binary, you cannot reconstitute hello.c from the hello. You can run it, move it to another machine, but the source file/code is not needed.
- 1 month ago
The source code of a program is specially designed to facilitate the work of computer programmers.
- 1 month ago
Source code is the fundamental component of a computer program that is created by a programmer. It can be read and easily understood by a human being.
- What do you think of the answers? You can sign in to give your opinion on the answer.
- mark_pocLv 61 month ago
The program source code is what the programmer originally writes in English. However, the computer doesn't understand English. It only understands ones and zeros. So the source code must be converted into zillions of ones and zeros so the computer can be directed to perform the program.
Here is an example of source code a programmer might write to print "Hello world" on the screen:
Start:
Print "Hello World"
End program.
So that is the program source code. However, it has to be run through another program called a compiler to convert it into the proper pattern of ones and zeros before it could be run on a computer and be delivered to the customer. And that would look something like this:
111001100010101001110100101000
0100100111011110100110111111001
1110010111010100001101111010111
111001100010101001110100101000
0100100111011110100110111111001
1110010111010100001101111010111
1000101011101010010010011111100......
Suppose the customer wanted to change the "Hello World" to "Hello Frank". He looks at his program file and sees all of the ones and zeros and can't even begin to figure anything out. So he goes back to the programmer and tells him he wants to modify it to say "Hello Frank". So the programmer, having the source file, can do that easily. He just changes "Hello World" to "Hello Frank". Then he runs it through a compiler program again to generate all of those ones and zeros (an executable file) and gives it back to the customer.
The source file is the "source" of the executable file (with all of the ones and zeros) that runs on the computer.
- ∅Lv 71 month ago
the source code is the code thay the program was written in. seeing what the programmers wrote will tell you what all the program does, and in some cases you may be allowed to rewrite the code to make changes as needed.
being open sourced also means it is more likely that there will be no surprises hidden in the code, like tracking functions that try to steal your private data.
- brilliant_movesLv 71 month ago
Hi, Saber.
Let's take an example and say we're programming in Java using the latest Java Development Kit (JDK).
If you have a file (i.e. if there exists a file on your hard drive...) whose name ends with ".java", then that file is source code for a Java program. It is a text file which is created by a programmer, written, in this case, in the Java programming language. It can be compiled to bytecode which is run on a Java Virtual Machine (VM).
Many other languages exist, this was just an example.