| Rev | Author | # | Line |
|---|---|---|---|
| 15 | StuartYeates | 1 | One of the most widely recognised [ProgrammingLanguage]s in the world. |
| 2 | |||
| 3 | It was designed by DennisRitchie at [BellLabs]/[AT&T] (along with other famous people such as KenThompson and BrianKernighan) as the systems ProgrammingLanguage to write their portable [Unix] OperatingSystem in. It was originally derived from [BCPL] but evolved radically. [C] is a great systems ProgrammingLanguage, but blamed for many problems with applications which many complain it is unsuited for. | ||
| 4 | |||
| 5 | The original version of [C] made many assumptions and led to [Lint] being written to check whether these assumptions were likely to be unsafe. Many of these assumptions were removed by the [ANSI] [C] standard and the remainder of [Lint]'s job merged into that of the [Compiler]s. | ||
| 6 | |||
| 7 | From fortune(6): | ||
| 8 | |||
| 20 | AristotlePagaltzis | 9 | * C, n.:: |
| 10 | A ProgrammingLanguage that is sort of like [Pascal] except more like AssemblyLanguage except that it isn't very much like either one, or anything else. It is either the best language available to the art today, or it isn't. | ||
| 15 | StuartYeates | 11 | |
| 12 | -- Ray Simard | ||
| 13 | |||
| 14 | * "The C Programming Language -- A language which combines the flexibility of AssemblyLanguage with the power of AssemblyLanguage." | ||
| 15 | |||
| 16 | [C] has inspired an entire class of languages, including [C++] which some say fixes many problems with [C], while others debate is just a horrible mess. [Java] has decended from [C++] as a portable language with clean ObjectOrientation, itself in turn the inspiration for MicrosoftCorporation's new language called [CSharp]. | ||
| 17 | |||
| 18 | See the [C History | http://cm.bell-labs.com/cm/cs/who/dmr/chist.html]. | ||
| 19 | |||
| 20 | I recommend you learn [C], and use it for writing OperatingSystem~s, and understanding how things actually are implemented, but then code in some other ProgrammingLanguage if you are going to write applications, especially networking programs. | ||
| 21 | |||
| 22 | ---- | ||
| 23 | |||
| 20 | AristotlePagaltzis | 24 | The following example is a program to approximate the value of pi. Compile it with <tt>gcc -traditional-cpp -o pi pi.c</tt>. If you want a better approximation, increase the program's source code area. <tt>:)</tt> |
| 15 | StuartYeates | 25 | |
| 20 | AristotlePagaltzis | 26 | <verbatim> |
| 27 | /* | ||
| 28 | * Program to compute an approximation of pi | ||
| 29 | * by Brian Westley, 1988 | ||
| 30 | */ | ||
| 31 | |||
| 32 | #define _ -F<00||--F-OO--; | ||
| 33 | int F=00,OO=00; | ||
| 34 | main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO() | ||
| 35 | { | ||
| 36 | _-_-_-_ | ||
| 37 | _-_-_-_-_-_-_-_-_ | ||
| 38 | _-_-_-_-_-_-_-_-_-_-_-_ | ||
| 39 | _-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 40 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 41 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 42 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 43 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 44 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 45 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 46 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 47 | _-_-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 48 | _-_-_-_-_-_-_-_-_-_-_-_-_-_ | ||
| 49 | _-_-_-_-_-_-_-_-_-_-_-_ | ||
| 50 | _-_-_-_-_-_-_-_ | ||
| 51 | _-_-_-_ | ||
| 52 | } | ||
| 53 | </verbatim> | ||
| 15 | StuartYeates | 54 | |
| 55 | (As seen in JargonFile:Obfuscated-C-Contest) | ||
| 20 | AristotlePagaltzis | 56 | |
| 15 | StuartYeates | 57 | ---- |
| 58 | |||
| 59 | Various snippets of information about [C] in the wiki: | ||
| 60 | * CastingPointerToFunction | ||
| 22 | LawrenceDoliveiro | 61 | |
| 62 | ---- | ||
| 63 | |||
| 64 | __Standardization__ | ||
| 65 | |||
| 66 | The first official standard for the language was “ANSI X3.159-1989” or [ANSI C|http://en.wikipedia.org/wiki/ANSI_C], also known as “C89” because it was completed in 1989. | ||
| 67 | |||
| 68 | This standard was picked up by [ISO] the following year as ISO/IEC 9899:1990, also known as “C90”. | ||
| 69 | |||
| 70 | In 1999, a revised standard, ISO/IEC 9899:1999, a.k.a. [C99|http://en.wikipedia.org/wiki/C99], was ratified. A decade later, I don’t think any widely-available compiler yet fully supports all its features, though [GCC] comes close. | ||
| 15 | StuartYeates | 71 | |
| 72 | ----- | ||
| 73 | CategoryProgrammingLanguages, CategoryImperativeProgrammingLanguages, CategoryMachineOrientedProgrammingLanguages, CategorySystemsProgrammingLanguages |
lib/blame.php:177: Warning: Invalid argument supplied for foreach()