Originally posted here by LordWire
What is meant by "c" being portable
As Lepeicaun said, it is were you can take C code written for one operating system and and modify it so it can run on another operating system.

(Example: Taking a source code written for Windows, and modify it so it will work on the Mac.)

For example, if we were to look at this code

Code:
void main()
{
system("cls");
}
This application would run fine on a Windows/Dos system, but when I compile and run the same code on my Slackware system I would get an error because the command "cls" is not a valid Bash command. In order to get this code to work on Linux I would need to modify it (port it) to Linux and change the system("cls"); part to system("clear"); as shown below

Code:
void main()
{
system("clear");
}
and then it would work without problems on Linux. I hope this explains it. I more then likely confused you. I would do a quick search on Google and look up the term "Porting" and "Port Code" and you should find a definition you should understand.

-- {Jellybelly}